Struct gpt_parser::GPTHeader
source · [−]#[repr(C, align(1))]pub struct GPTHeader {Show 14 fields
pub signature: [u8; 8],
pub revision: u32le,
pub header_size_le: u32le,
pub header_crc32: u32le,
pub reserved: u32le,
pub current_lba: u64le,
pub backup_lba: u64le,
pub first_usable: u64le,
pub last_usable: u64le,
pub disk_guid: Uuid,
pub part_start_lba: u64le,
pub num_parts: u32le,
pub part_size: u32le,
pub part_table_crc32: u32le,
}Fields
signature: [u8; 8]GPT header magic signature, hardcoded to “EFI PART”.
revision: u32le00 00 01 00
header_size_le: u32lelittle endian
header_crc32: u32leCRC32 of the header with crc32 section zeroed
reserved: u32lemust be 0
current_lba: u64leFor main header, 1
backup_lba: u64leLBA for backup header
first_usable: u64leFirst usable LBA for partitions (primary table last LBA + 1)
last_usable: u64leLast usable LBA (secondary partition table first LBA - 1)
disk_guid: UuidUUID of the disk
part_start_lba: u64leStarting LBA of partition entries
num_parts: u32leNumber of partition entries
part_size: u32leSize of a partition entry, usually 128
part_table_crc32: u32leCRC32 of the partition table
Implementations
sourceimpl GPTHeader
impl GPTHeader
pub fn verify_signature(&self) -> bool
pub unsafe fn parse_gpt_header<'a, T: Sized + LBAIndex>(
gpt_header_lba: &'a LBA<T>
) -> Result<&'a Self, &'static str>
pub fn parse_partitions<F: Fn(&GPTPartition, &mut T), T>(
part_array: &[GPTPartition],
size: usize,
foreach: F,
data: &mut T
)
Trait Implementations
impl Copy for GPTHeader
impl Eq for GPTHeader
impl StructuralEq for GPTHeader
impl StructuralPartialEq for GPTHeader
Auto Trait Implementations
impl RefUnwindSafe for GPTHeader
impl Send for GPTHeader
impl Sync for GPTHeader
impl Unpin for GPTHeader
impl UnwindSafe for GPTHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more