generic_camera

Trait GenCamInfo

source
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§

source

fn camera_ready(&self) -> bool

Check if camera is ready.

source

fn camera_name(&self) -> &str

Get the camera name.

source

fn cancel_capture(&self) -> GenCamResult<()>

Cancel an ongoing exposure.

source

fn is_capturing(&self) -> bool

Check if the camera is currently capturing an image.

source

fn camera_state(&self) -> GenCamResult<GenCamState>

Get the camera state.

source

fn list_properties(&self) -> &HashMap<GenCamCtrl, Property>

Get optional capabilities of the camera.

source

fn get_property(&self, name: GenCamCtrl) -> GenCamResult<(PropertyValue, bool)>

Get a property by name.

source

fn set_property( &mut self, name: GenCamCtrl, value: &PropertyValue, auto: bool, ) -> GenCamResult<()>

Set a property by name.

Implementors§