#[repr(transparent)]pub struct MbrPartitionTable {
pub partitions: [MbrPartition; 4],
}Expand description
The MBR partition table (4 primary partition entries).
Fields§
§partitions: [MbrPartition; 4]The four primary partition entries.
Implementations§
Source§impl MbrPartitionTable
impl MbrPartitionTable
Sourcepub const fn protective(disk_sectors: u64) -> Self
pub const fn protective(disk_sectors: u64) -> Self
Creates a protective MBR partition table for GPT disks.
This creates a single partition entry covering the entire disk, with type 0xEE (GPT Protective).
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns whether this appears to be a valid MBR partition table.
Checks that boot indicators are valid (0x00 or 0x80).
Sourcepub fn is_protective(&self) -> bool
pub fn is_protective(&self) -> bool
Returns whether this is a protective MBR (indicating a GPT disk).
Sourcepub fn iter(&self) -> impl Iterator<Item = &MbrPartition>
pub fn iter(&self) -> impl Iterator<Item = &MbrPartition>
Returns an iterator over non-empty partitions.
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut MbrPartition>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut MbrPartition>
Returns a mutable iterator over all partition slots.
Trait Implementations§
Source§impl Clone for MbrPartitionTable
impl Clone for MbrPartitionTable
Source§fn clone(&self) -> MbrPartitionTable
fn clone(&self) -> MbrPartitionTable
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 moreimpl Copy for MbrPartitionTable
Source§impl Debug for MbrPartitionTable
impl Debug for MbrPartitionTable
Source§impl Default for MbrPartitionTable
impl Default for MbrPartitionTable
Source§impl Index<usize> for MbrPartitionTable
impl Index<usize> for MbrPartitionTable
Source§impl IndexMut<usize> for MbrPartitionTable
impl IndexMut<usize> for MbrPartitionTable
impl Pod for MbrPartitionTable
Auto Trait Implementations§
impl Freeze for MbrPartitionTable
impl RefUnwindSafe for MbrPartitionTable
impl Send for MbrPartitionTable
impl Sync for MbrPartitionTable
impl Unpin for MbrPartitionTable
impl UnsafeUnpin for MbrPartitionTable
impl UnwindSafe for MbrPartitionTable
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.