pub struct Device {
pub name: String,
pub partitions: Vec<Partition>,
pub is_removable: bool,
pub model: Option<String>,
pub serial: Option<String>,
pub size: Size,
pub uuid: GptUUID,
}
Expand description
A block device
Fields§
§name: String
The name of the block device
partitions: Vec<Partition>
list of partitions
is_removable: bool
is it a fixed device or a removable one like a flash drive or sd card
model: Option<String>
the model string - most common a combination of vendor name and model identifier will be None for virtual devices
serial: Option<String>
the hardware serial string
size: Size
size of the device
uuid: GptUUID
the GUID from GPT (needs feature “gpt” to be enabled)
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