Skip to main content

Module part

Module part 

Source
Expand description

Partition-table layer.

Two implementations in v1: mbr::Mbr (4-primary MBR) and gpt::Gpt (128-entry GPT with protective MBR + backup header). Both go through the PartitionTable trait so higher layers can target either uniformly.

A partition table is just metadata — it does not allocate or zero data blocks beyond its own header sectors. To get a filesystem-grade view of a single partition’s bytes, call slice_partition which builds a SlicedBackend covering exactly the partition’s LBA range.

Re-exports§

pub use gpt::Gpt;
pub use mbr::Mbr;

Modules§

gpt
GUID Partition Table.
mbr
Master Boot Record partition table.

Structs§

Partition
One partition entry, unified across MBR and GPT.

Enums§

PartitionKind
Semantic partition type. Convertible to either an MBR u8 code or a GPT type UUID; an escape-hatch variant exists for each direction.

Traits§

PartitionTable
Common interface implemented by Mbr and Gpt. Object-safe enough that higher layers can hold a Box<dyn PartitionTable> if useful.

Functions§

slice_partition
Build a SlicedBackend that exposes exactly the bytes of pt.partitions()[index].