Skip to main content

PartitionTableRead

Trait PartitionTableRead 

Source
pub trait PartitionTableRead {
    type Partition: PartitionInfoTrait;

    // Required methods
    fn partition_count(&self) -> usize;
    fn partition(&self, index: usize) -> Option<&Self::Partition>;
}
Expand description

Trait for partition table types that support reading.

Required Associated Types§

Source

type Partition: PartitionInfoTrait

The partition entry type for this table.

Required Methods§

Source

fn partition_count(&self) -> usize

Returns the number of partitions in the table.

Source

fn partition(&self, index: usize) -> Option<&Self::Partition>

Returns a reference to a partition by index.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§