pub struct CameraStream { /* private fields */ }Expand description
Reactive camera stream
Opens the camera via native bridge (mobile) or cpal+platform API (desktop). Frames are delivered as RGBA data via a shared buffer. Drop to stop capture.
Implementations§
Source§impl CameraStream
impl CameraStream
Sourcepub fn open(config: CameraConfig) -> Self
pub fn open(config: CameraConfig) -> Self
Open the camera and start capturing frames
Sourcepub fn latest_frame(&self) -> Option<Frame>
pub fn latest_frame(&self) -> Option<Frame>
Get the latest camera frame (None if no frame yet)
Sourcepub fn push_frame(&self, frame: Frame)
pub fn push_frame(&self, frame: Frame)
Push a frame externally (for desktop testing or custom capture)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CameraStream
impl !RefUnwindSafe for CameraStream
impl Send for CameraStream
impl Sync for CameraStream
impl Unpin for CameraStream
impl UnsafeUnpin for CameraStream
impl !UnwindSafe for CameraStream
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