Trait eye_hal::traits::Device

source ·
pub trait Device<'a> {
    type Stream: Stream<'a>;

    // Required methods
    fn streams(&self) -> Result<Vec<Descriptor>>;
    fn start_stream(&self, desc: &Descriptor) -> Result<Self::Stream>;
    fn controls(&self) -> Result<Vec<Descriptor>>;
    fn control(&self, id: u32) -> Result<State>;
    fn set_control(&mut self, id: u32, val: &State) -> Result<()>;
}
Expand description

Platform device abstraction

Required Associated Types§

source

type Stream: Stream<'a>

Capture stream type created by this device

Required Methods§

source

fn streams(&self) -> Result<Vec<Descriptor>>

Returns the supported streams

source

fn start_stream(&self, desc: &Descriptor) -> Result<Self::Stream>

Returns a stream which produces images

source

fn controls(&self) -> Result<Vec<Descriptor>>

Returns the supported controls

source

fn control(&self, id: u32) -> Result<State>

Returns the current control value for an ID

source

fn set_control(&mut self, id: u32, val: &State) -> Result<()>

Sets the control value, returns error for incompatible value types

Implementors§

source§

impl<'a> Device<'a> for Device<'a>

§

type Stream = Stream<'a>