Trait disk_types::PartitionTableExt
source · pub trait PartitionTableExt: BlockDeviceExt {
fn get_partition_table(&self) -> Option<PartitionTable>;
fn get_partition_type_count(&self) -> (usize, usize, bool);
fn supports_additional_partition_type(
&self,
new_type: PartitionType
) -> Result<(), PartitionTableError> { ... }
}
Expand description
Methods for block devices that may have a partition table.
Required Methods§
sourcefn get_partition_table(&self) -> Option<PartitionTable>
fn get_partition_table(&self) -> Option<PartitionTable>
Fetch the partition table info on this device, if it exists.
sourcefn get_partition_type_count(&self) -> (usize, usize, bool)
fn get_partition_type_count(&self) -> (usize, usize, bool)
Obtain the number of primary and logical partitions, in that order.
Provided Methods§
sourcefn supports_additional_partition_type(
&self,
new_type: PartitionType
) -> Result<(), PartitionTableError>
fn supports_additional_partition_type(
&self,
new_type: PartitionType
) -> Result<(), PartitionTableError>
Checks if the additional partition type can be added to the partition table.