pub struct CameraViewer { /* private fields */ }Expand description
Implementations§
Source§impl CameraViewer
impl CameraViewer
pub fn new(camera: Camera) -> Self
pub fn corner_radius(self, corner_radius: impl Into<CornerRadius>) -> Self
Sourcepub fn loading_placeholder(self, placeholder: impl Into<Element>) -> Self
pub fn loading_placeholder(self, placeholder: impl Into<Element>) -> Self
Custom element rendered while the camera has not yet produced a frame.
Sourcepub fn error_renderer(
self,
renderer: impl Into<Callback<CameraError, Element>>,
) -> Self
pub fn error_renderer( self, renderer: impl Into<Callback<CameraError, Element>>, ) -> Self
Custom element rendered when the camera fails before producing any frame.
Trait Implementations§
Source§impl AccessibilityExt for CameraViewer
impl AccessibilityExt for CameraViewer
fn get_accessibility_data(&mut self) -> &mut AccessibilityData
fn accessibility(self, accessibility: AccessibilityData) -> Self
fn a11y_id(self, a11y_id: impl Into<Option<NodeId>>) -> Self
fn a11y_focusable(self, a11y_focusable: impl Into<Focusable>) -> Self
fn a11y_auto_focus(self, a11y_auto_focus: impl Into<bool>) -> Self
fn a11y_member_of(self, a11y_member_of: impl Into<NodeId>) -> Self
fn a11y_role(self, a11y_role: impl Into<Role>) -> Self
fn a11y_alt(self, value: impl Into<Box<str>>) -> Self
fn a11y_builder(self, with: impl FnOnce(&mut Node)) -> Self
Source§impl ChildrenExt for CameraViewer
impl ChildrenExt for CameraViewer
Source§fn get_children(&mut self) -> &mut Vec<Element>
fn get_children(&mut self) -> &mut Vec<Element>
Returns a mutable reference to the internal children vector. Read more
Source§fn children(self, children: impl IntoIterator<Item = Element>) -> Self
fn children(self, children: impl IntoIterator<Item = Element>) -> Self
Source§fn maybe_child<C>(self, child: Option<C>) -> Selfwhere
C: IntoElement,
fn maybe_child<C>(self, child: Option<C>) -> Selfwhere
C: IntoElement,
Source§fn child<C>(self, child: C) -> Selfwhere
C: IntoElement,
fn child<C>(self, child: C) -> Selfwhere
C: IntoElement,
Appends a single child element. Read more
Source§impl Component for CameraViewer
impl Component for CameraViewer
fn render(&self) -> impl IntoElement
fn render_key(&self) -> DiffKey
Source§impl ContainerExt for CameraViewer
impl ContainerExt for CameraViewer
fn position(self, position: impl Into<Position>) -> Self
fn padding(self, padding: impl Into<Gaps>) -> Self
fn margin(self, margin: impl Into<Gaps>) -> Self
fn min_width(self, minimum_width: impl Into<Size>) -> Self
fn min_height(self, minimum_height: impl Into<Size>) -> Self
fn max_width(self, maximum_width: impl Into<Size>) -> Self
fn max_height(self, maximum_height: impl Into<Size>) -> Self
fn visible_width(self, visible_width: impl Into<VisibleSize>) -> Self
fn visible_height(self, visible_height: impl Into<VisibleSize>) -> Self
Source§impl ContainerWithContentExt for CameraViewer
impl ContainerWithContentExt for CameraViewer
fn direction(self, direction: Direction) -> Self
fn main_align(self, main_align: Alignment) -> Self
fn cross_align(self, cross_align: Alignment) -> Self
fn spacing(self, spacing: impl Into<f32>) -> Self
fn content(self, content: Content) -> Self
fn center(self) -> Self
fn offset_x(self, offset_x: impl Into<f32>) -> Self
fn offset_y(self, offset_y: impl Into<f32>) -> Self
fn vertical(self) -> Self
fn horizontal(self) -> Self
Source§impl EffectExt for CameraViewer
impl EffectExt for CameraViewer
fn get_effect(&mut self) -> &mut EffectData
fn effect(self, effect: EffectData) -> Self
fn overflow(self, overflow: impl Into<Overflow>) -> Self
fn blur(self, blur: impl Into<f32>) -> Self
fn rotation(self, rotation: impl Into<f32>) -> Self
fn opacity(self, opacity: impl Into<f32>) -> Self
fn scale(self, scale: impl Into<Scale>) -> Self
Source§impl ImageExt for CameraViewer
impl ImageExt for CameraViewer
fn get_image_data(&mut self) -> &mut ImageData
fn image_data(self, image_data: ImageData) -> Self
fn sampling_mode(self, sampling_mode: SamplingMode) -> Self
fn aspect_ratio(self, aspect_ratio: AspectRatio) -> Self
fn image_cover(self, image_cover: ImageCover) -> Self
Source§impl KeyExt for CameraViewer
impl KeyExt for CameraViewer
Source§impl LayoutExt for CameraViewer
impl LayoutExt for CameraViewer
fn get_layout(&mut self) -> &mut LayoutData
fn layout(self, layout: LayoutData) -> Self
Source§impl PartialEq for CameraViewer
impl PartialEq for CameraViewer
impl StructuralPartialEq for CameraViewer
Auto Trait Implementations§
impl Freeze for CameraViewer
impl !RefUnwindSafe for CameraViewer
impl !Send for CameraViewer
impl !Sync for CameraViewer
impl Unpin for CameraViewer
impl UnsafeUnpin for CameraViewer
impl !UnwindSafe for CameraViewer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ComponentKey for Twhere
T: Component,
impl<T> ComponentKey for Twhere
T: Component,
fn default_key(&self) -> DiffKey
Source§impl<T> ComponentProps for T
impl<T> ComponentProps for T
fn changed(&self, other: &(dyn ComponentProps + 'static)) -> bool
Source§impl<T> ContainerSizeExt for Twhere
T: ContainerExt,
impl<T> ContainerSizeExt for Twhere
T: ContainerExt,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more