pub struct Drive { /* private fields */ }Expand description
An interface to a disc drive.
Implementations§
Source§impl Drive
impl Drive
Sourcepub fn new() -> Result<Self, DriveNotFoundError>
pub fn new() -> Result<Self, DriveNotFoundError>
Opens a default connected drive.
Sourcepub fn with_drive(drive: PathBuf) -> Result<Self, DriveOpenError>
pub fn with_drive(drive: PathBuf) -> Result<Self, DriveOpenError>
Opens drive at given path.
See Self::drives() for a list of connected drives.
Sourcepub fn hardware_identifiers(
&self,
) -> Result<HardwareIdentifiers, DriveOperationError>
pub fn hardware_identifiers( &self, ) -> Result<HardwareIdentifiers, DriveOperationError>
Returns hardware identifiers of the drive such as Model, Vendor and Revision.
Sourcepub fn capabilities(&self) -> Result<DriveCapabilities, DriveOperationError>
pub fn capabilities(&self) -> Result<DriveCapabilities, DriveOperationError>
Returns drive capabilities.
Auto Trait Implementations§
impl !Send for Drive
impl !Sync for Drive
impl Freeze for Drive
impl RefUnwindSafe for Drive
impl Unpin for Drive
impl UnsafeUnpin for Drive
impl UnwindSafe for Drive
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