pub struct MBR<IO: Read + Seek> { /* private fields */ }Expand description
Used to grab partitions from the MBR
Implementations§
Source§impl<IO: Read + Seek> MBR<IO>
impl<IO: Read + Seek> MBR<IO>
Sourcepub fn new(io: IO) -> Result<Self, <IO as Io>::Error>
pub fn new(io: IO) -> Result<Self, <IO as Io>::Error>
Create a new MBR from anything that implements embedded_io
Sourcepub fn get_partition(
&mut self,
id: PartitionId,
) -> Result<Partition<'_, IO>, IO::Error>
pub fn get_partition( &mut self, id: PartitionId, ) -> Result<Partition<'_, IO>, IO::Error>
Get a partition from the MBR
Sourcepub fn get_partition_type(&self, id: PartitionId) -> PartitionType
pub fn get_partition_type(&self, id: PartitionId) -> PartitionType
Get the partition type from the MBR
Sourcepub fn is_partition_bootable(&self, id: PartitionId) -> bool
pub fn is_partition_bootable(&self, id: PartitionId) -> bool
Check if a partition is bootable in the MBR
Auto Trait Implementations§
impl<IO> Freeze for MBR<IO>where
IO: Freeze,
impl<IO> RefUnwindSafe for MBR<IO>where
IO: RefUnwindSafe,
impl<IO> Send for MBR<IO>where
IO: Send,
impl<IO> Sync for MBR<IO>where
IO: Sync,
impl<IO> Unpin for MBR<IO>where
IO: Unpin,
impl<IO> UnwindSafe for MBR<IO>where
IO: UnwindSafe,
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