pub struct RawDevice { /* private fields */ }
Expand description
This struct handles a raw device, which should be opened with open
or open_uncached
if you want to manage the proper MTP device.
Implementations§
Source§impl RawDevice
impl RawDevice
Sourcepub fn open(&self) -> Option<MtpDevice>
pub fn open(&self) -> Option<MtpDevice>
Open an MTP device from this raw device descriptor, this method may cache devices, thus may be slower.
Sourcepub fn open_uncached(&self) -> Option<MtpDevice>
pub fn open_uncached(&self) -> Option<MtpDevice>
Open an MTP device from this raw device descriptor, uncached version.
Sourcepub fn bus_number(&self) -> u32
pub fn bus_number(&self) -> u32
Returns the bus number of this raw device.
Sourcepub fn dev_number(&self) -> u8
pub fn dev_number(&self) -> u8
Returns the device number of this raw device.
Sourcepub fn device_entry(&self) -> DeviceEntry
pub fn device_entry(&self) -> DeviceEntry
Returns the device entry of this raw device.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RawDevice
impl RefUnwindSafe for RawDevice
impl !Send for RawDevice
impl !Sync for RawDevice
impl Unpin for RawDevice
impl UnwindSafe for RawDevice
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