pub struct PartitionEntry {
pub status: u8,
pub chs_first: Chs,
pub type_code: TypeCode,
pub chs_last: Chs,
pub lba_start: u32,
pub lba_count: u32,
}Expand description
A single 16-byte primary partition table entry.
Fields§
§status: u80x80 = bootable, 0x00 = inactive, other values are invalid.
chs_first: ChsCHS address of the partition’s first sector.
type_code: TypeCodePartition type code.
chs_last: ChsCHS address of the partition’s last sector.
lba_start: u32LBA address of the partition’s first sector.
lba_count: u32Number of sectors in the partition.
Implementations§
Source§impl PartitionEntry
impl PartitionEntry
Sourcepub fn from_bytes(b: &[u8; 16]) -> Self
pub fn from_bytes(b: &[u8; 16]) -> Self
Decode a 16-byte partition entry slice.
Sourcepub fn is_bootable(&self) -> bool
pub fn is_bootable(&self) -> bool
Returns true if the status byte marks this partition as bootable.
Sourcepub fn is_extended(&self) -> bool
pub fn is_extended(&self) -> bool
true if this entry describes an extended partition container.
Trait Implementations§
Source§impl Clone for PartitionEntry
impl Clone for PartitionEntry
Source§fn clone(&self) -> PartitionEntry
fn clone(&self) -> PartitionEntry
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 moreSource§impl Debug for PartitionEntry
impl Debug for PartitionEntry
Source§impl PartialEq for PartitionEntry
impl PartialEq for PartitionEntry
Source§fn eq(&self, other: &PartitionEntry) -> bool
fn eq(&self, other: &PartitionEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PartitionEntry
impl StructuralPartialEq for PartitionEntry
Auto Trait Implementations§
impl Freeze for PartitionEntry
impl RefUnwindSafe for PartitionEntry
impl Send for PartitionEntry
impl Sync for PartitionEntry
impl Unpin for PartitionEntry
impl UnsafeUnpin for PartitionEntry
impl UnwindSafe for PartitionEntry
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