pub struct Partition {
pub start: u64,
pub length: u64,
pub kind: PartitionKind,
pub label: Option<String>,
pub uuid: Option<[u8; 16]>,
}Expand description
One partition. start/length are byte values relative to the start of
the whole device.
Fields§
§start: u64§length: u64§kind: PartitionKind§label: Option<String>§uuid: Option<[u8; 16]>Implementations§
Source§impl Partition
impl Partition
Sourcepub fn is_bootable(&self) -> bool
pub fn is_bootable(&self) -> bool
True when this partition is marked bootable in the on-disk table.
- MBR: the active flag is set on the entry (legacy BIOS boots from the active partition).
- GPT: the type GUID is the EFI System Partition GUID or the
LEGACY_BIOS_BOOTABLEattribute bit is set. - Whole: never (no firmware-level bootability for table-less media).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Partition
impl RefUnwindSafe for Partition
impl Send for Partition
impl Sync for Partition
impl Unpin for Partition
impl UnsafeUnpin for Partition
impl UnwindSafe for Partition
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