pub trait GenCamInfo:
Send
+ Sync
+ Debug {
// Required methods
fn camera_ready(&self) -> bool;
fn camera_name(&self) -> &str;
fn cancel_capture(&self) -> GenCamResult<()>;
fn is_capturing(&self) -> bool;
fn camera_state(&self) -> GenCamResult<GenCamState>;
fn list_properties(&self) -> &HashMap<GenCamCtrl, Property>;
fn get_property(
&self,
name: GenCamCtrl,
) -> GenCamResult<(PropertyValue, bool)>;
fn set_property(
&mut self,
name: GenCamCtrl,
value: &PropertyValue,
auto: bool,
) -> GenCamResult<()>;
}
Expand description
Trait for obtaining camera information and cancelling any ongoing image capture. This trait is intended to be exclusively applied to a clonable object that can be passed to other threads for housekeeping purposes.
Required Methods§
sourcefn camera_ready(&self) -> bool
fn camera_ready(&self) -> bool
Check if camera is ready.
sourcefn camera_name(&self) -> &str
fn camera_name(&self) -> &str
Get the camera name.
sourcefn cancel_capture(&self) -> GenCamResult<()>
fn cancel_capture(&self) -> GenCamResult<()>
Cancel an ongoing exposure.
sourcefn is_capturing(&self) -> bool
fn is_capturing(&self) -> bool
Check if the camera is currently capturing an image.
sourcefn camera_state(&self) -> GenCamResult<GenCamState>
fn camera_state(&self) -> GenCamResult<GenCamState>
Get the camera state.
sourcefn list_properties(&self) -> &HashMap<GenCamCtrl, Property>
fn list_properties(&self) -> &HashMap<GenCamCtrl, Property>
Get optional capabilities of the camera.
sourcefn get_property(&self, name: GenCamCtrl) -> GenCamResult<(PropertyValue, bool)>
fn get_property(&self, name: GenCamCtrl) -> GenCamResult<(PropertyValue, bool)>
Get a property by name.
sourcefn set_property(
&mut self,
name: GenCamCtrl,
value: &PropertyValue,
auto: bool,
) -> GenCamResult<()>
fn set_property( &mut self, name: GenCamCtrl, value: &PropertyValue, auto: bool, ) -> GenCamResult<()>
Set a property by name.