pub struct Devices { /* private fields */ }Expand description
Owns the hot-plug watcher and the registry of connected cameras.
Construct with Devices::new. The watcher thread is spawned on
Devices::new and stops when the struct is dropped.
Implementations§
Source§impl Devices
impl Devices
Sourcepub fn list(&self) -> Vec<DeviceInfo>
pub fn list(&self) -> Vec<DeviceInfo>
Snapshot of currently-connected OBSBOT cameras.
Sourcepub fn by_serial(&self, sn: &str) -> Option<DeviceInfo>
pub fn by_serial(&self, sn: &str) -> Option<DeviceInfo>
Find a connected camera by serial number.
Sourcepub fn open(&self, info: &DeviceInfo) -> Result<Device>
pub fn open(&self, info: &DeviceInfo) -> Result<Device>
Open a connected camera for control.
Sourcepub fn events(&self) -> EventReceiver
pub fn events(&self) -> EventReceiver
Subscribe to device add/remove events. Each call returns a clone of the receiver; events are broadcast to every clone.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Devices
impl !RefUnwindSafe for Devices
impl Send for Devices
impl Sync for Devices
impl Unpin for Devices
impl UnsafeUnpin for Devices
impl !UnwindSafe for Devices
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