pub enum DeviceInfo {
Block(BlockInfo),
Partition(PartitionInfo),
Volume(VolumeInfo),
}Variants§
Block(BlockInfo)
A raw non-partition block device.
Partition(PartitionInfo)
A static partition with fixed physical mappings.
Volume(VolumeInfo)
A dynamic volume whose slice/block count is queried via get_volume_info.
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
pub fn label(&self) -> &str
pub fn device_flags(&self) -> DeviceFlag
Sourcepub fn block_count(&self) -> Option<u64>
pub fn block_count(&self) -> Option<u64>
Returns the block count of the device or partition. Returns None for dynamic volumes (whose size needs to be queried from the volume manager).
pub fn max_transfer_blocks(&self) -> Option<NonZero<u32>>
pub fn type_guid(&self) -> Option<[u8; 16]>
pub fn instance_guid(&self) -> Option<[u8; 16]>
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnsafeUnpin for DeviceInfo
impl UnwindSafe for DeviceInfo
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