pub struct PartitionTable<'a> { /* private fields */ }Expand description
A partition table.
Implementations§
Source§impl<'a> PartitionTable<'a>
impl<'a> PartitionTable<'a>
Sourcepub fn get_partition(&self, index: usize) -> Result<PartitionEntry<'a>, Error>
pub fn get_partition(&self, index: usize) -> Result<PartitionEntry<'a>, Error>
Get a partition entry.
Sourcepub fn find_partition(
&self,
pt: PartitionType,
) -> Result<Option<PartitionEntry<'a>>, Error>
pub fn find_partition( &self, pt: PartitionType, ) -> Result<Option<PartitionEntry<'a>>, Error>
Get the first partition matching the given partition type.
Sourcepub fn iter(&self) -> impl Iterator<Item = PartitionEntry<'a>>
pub fn iter(&self) -> impl Iterator<Item = PartitionEntry<'a>>
Returns an iterator over the partitions.
Sourcepub fn booted_partition(&self) -> Result<Option<PartitionEntry<'a>>, Error>
pub fn booted_partition(&self) -> Result<Option<PartitionEntry<'a>>, Error>
Get the currently booted partition.