Trait generic_camera::GenCamInfo
source · pub trait GenCamInfo:
Send
+ Sync
+ Debug {
// Required methods
fn camera_ready(&self) -> bool;
fn camera_name(&self) -> &str;
fn cancel_capture(&self) -> Result<()>;
fn is_capturing(&self) -> bool;
fn list_properties(&self) -> Vec<Property>;
fn get_property(&self, name: GenCamCtrl) -> Option<&PropertyValue>;
fn set_property(
&mut self,
name: GenCamCtrl,
value: &PropertyValue,
) -> Result<()>;
fn get_property_auto(&self, name: GenCamCtrl) -> Result<bool>;
fn set_property_auto(&mut self, name: GenCamCtrl, auto: bool) -> Result<()>;
}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) -> Result<()>
fn cancel_capture(&self) -> Result<()>
Cancel an ongoing exposure.
sourcefn is_capturing(&self) -> bool
fn is_capturing(&self) -> bool
Check if the camera is currently capturing an image.
sourcefn list_properties(&self) -> Vec<Property>
fn list_properties(&self) -> Vec<Property>
Get optional capabilities of the camera.
sourcefn get_property(&self, name: GenCamCtrl) -> Option<&PropertyValue>
fn get_property(&self, name: GenCamCtrl) -> Option<&PropertyValue>
Get a property by name.
sourcefn set_property(
&mut self,
name: GenCamCtrl,
value: &PropertyValue,
) -> Result<()>
fn set_property( &mut self, name: GenCamCtrl, value: &PropertyValue, ) -> Result<()>
Set a property by name.
sourcefn get_property_auto(&self, name: GenCamCtrl) -> Result<bool>
fn get_property_auto(&self, name: GenCamCtrl) -> Result<bool>
Check if a property is in auto mode.
sourcefn set_property_auto(&mut self, name: GenCamCtrl, auto: bool) -> Result<()>
fn set_property_auto(&mut self, name: GenCamCtrl, auto: bool) -> Result<()>
Set a property to auto mode.