[−][src]Struct lfs_core::Disk
a "block device"
Fields
name: String
a name, like "sda", "sdc", "nvme0n1", etc.
rotational: Option<bool>
true for HDD, false for SSD, None for unknown. This information isn't reliable for USB devices
removable: Option<bool>
whether the system thinks the media is removable. Seems reliable.
Implementations
impl Disk
[src]
pub fn new(name: String) -> Self
[src]
pub fn disk_type(&self) -> &'static str
[src]
a synthetic code trying to express the essence of the type of media, an empty str being returned when information couldn't be gathered. This code is for humans and may change in future minor versions.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Disk
impl Send for Disk
impl Sync for Disk
impl Unpin for Disk
impl UnwindSafe for Disk
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,