pub struct MockCameraController { /* private fields */ }Expand description
Mock camera controller for testing
Generates synthetic frames with configurable patterns.
Implementations§
Source§impl MockCameraController
impl MockCameraController
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Get the current frame count
Sourcepub fn reset_frame_count(&mut self)
pub fn reset_frame_count(&mut self)
Reset the frame count
Trait Implementations§
Source§impl CameraController for MockCameraController
impl CameraController for MockCameraController
Source§type Frame = CameraFrame
type Frame = CameraFrame
Frame type produced by this camera
Source§fn capture_frame<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Self::Frame, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn capture_frame<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Self::Frame, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Capture a single frame from the camera Read more
Source§fn intrinsics(&self) -> Option<CameraIntrinsics>
fn intrinsics(&self) -> Option<CameraIntrinsics>
Get camera intrinsics if available Read more
Source§fn set_parameters<'life0, 'async_trait>(
&'life0 mut self,
params: CameraParameters,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_parameters<'life0, 'async_trait>(
&'life0 mut self,
params: CameraParameters,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set camera parameters Read more
Source§fn get_parameters<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CameraParameters, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_parameters<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CameraParameters, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current camera parameters
Source§fn info(&self) -> CameraInfo
fn info(&self) -> CameraInfo
Get camera information
Source§fn supports_depth(&self) -> bool
fn supports_depth(&self) -> bool
Check if the camera supports depth
Source§fn supports_infrared(&self) -> bool
fn supports_infrared(&self) -> bool
Check if the camera supports infrared
Source§impl Controller for MockCameraController
impl Controller for MockCameraController
Source§type Config = MockCameraConfig
type Config = MockCameraConfig
Configuration type for this controller
Source§type Error = ControllerError
type Error = ControllerError
Error type for this controller
Source§fn init<'async_trait>(
config: Self::Config,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
fn init<'async_trait>(
config: Self::Config,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
Initialize the controller with the given configuration Read more
Source§fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the controller Read more
Source§fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the controller Read more
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ControllerHealth> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ControllerHealth> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check the health status of the controller
Source§fn capabilities(&self) -> ControllerCapabilities
fn capabilities(&self) -> ControllerCapabilities
Get the capabilities of this controller Read more
Auto Trait Implementations§
impl Freeze for MockCameraController
impl RefUnwindSafe for MockCameraController
impl Send for MockCameraController
impl Sync for MockCameraController
impl Unpin for MockCameraController
impl UnwindSafe for MockCameraController
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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