pub enum PartitionKind {
Gpt {
type_guid: [u8; 16],
attributes: u64,
},
Mbr {
type_byte: u8,
active: bool,
},
Whole,
}Expand description
The on-disk type-tag for the partition. For GPT this is the type GUID +
the 64-bit attributes field; for MBR it’s the one-byte type code + the
active/boot flag. Whole is reserved for the (future) “no partition
table” probe result.
Callers that only need a “did the firmware mark this as bootable?” answer
should use Partition::is_bootable instead of inspecting bits directly.
Variants§
Gpt
type_guid: 16-byte on-disk partition type GUID.
attributes: 64-bit attributes field from entry offset +48. Bit 0 =
required partition, bit 2 = legacy BIOS bootable; see
crate::gpt::attr for the full set of named bits.
Mbr
type_byte: MBR partition type code.
active: bit 0x80 of the entry’s status byte (offset +0). Marks the
“active” / “bootable” partition that legacy BIOS firmware boots.
Whole
Trait Implementations§
Source§impl Clone for PartitionKind
impl Clone for PartitionKind
Source§fn clone(&self) -> PartitionKind
fn clone(&self) -> PartitionKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartitionKind
impl Debug for PartitionKind
Source§impl PartialEq for PartitionKind
impl PartialEq for PartitionKind
Source§fn eq(&self, other: &PartitionKind) -> bool
fn eq(&self, other: &PartitionKind) -> bool
self and other values to be equal, and is used by ==.