pub struct CameraPreview {
pub key: Option<KeyRef>,
pub session: Ref<CameraSession>,
}Expand description
A camera session’s preview, laid out at the size of the format the camera runs in, turned by the preview’s rotation angle, in logical pixels, or as large as the constraints let it be at that aspect; laid out again as the angle changes. It places the layer the session started with for its preview, which the system draws into; a session started without one shows nothing there.
Fields§
§key: Option<KeyRef>§session: Ref<CameraSession>Implementations§
Source§impl CameraPreview
impl CameraPreview
pub fn new(session: Ref<CameraSession>) -> CameraPreview
pub fn key(self, key: KeyRef) -> CameraPreview
Trait Implementations§
Source§impl Clone for CameraPreview
impl Clone for CameraPreview
Source§impl Debug for CameraPreview
impl Debug for CameraPreview
Source§impl StatelessWidget for CameraPreview
impl StatelessWidget for CameraPreview
Source§fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
Describes the part of the user interface represented by this widget. Read more
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Dart’s constructor asserts that relate two or more arguments. Read more
Source§fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
Dart’s
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for CameraPreview
impl !Send for CameraPreview
impl !Sync for CameraPreview
impl !UnwindSafe for CameraPreview
impl Forget for CameraPreview
impl Freeze for CameraPreviewwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
NonZero<u32>: Freeze,
PhantomData<fn() -> CameraSession>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
impl Move for CameraPreview
impl Unpin for CameraPreview
impl UnsafeUnpin for CameraPreviewwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<fn() -> CameraSession>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
The widget as a tree node, made where this is called: its
creation_location.