pub struct Device(pub File);
Tuple Fields§
§0: File
Implementations§
source§impl Device
impl Device
pub fn new(p: impl AsRef<Path>) -> Result<Self, Error>
pub fn get_device_info(&self) -> Result<MediaDeviceInfo, Errno>
sourcepub fn try_lock(self) -> Result<Locked<Self>, Self>
pub fn try_lock(self) -> Result<Locked<Self>, Self>
Returns Ok when successfully locked, Err otherwise. TODO: A device is considered locked for libvidi when its main entity is locked?. FIXME: Does not attempt to retry when interrupted.
pub fn get_video_capture_path(&self) -> Result<PathBuf, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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