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: u32le
00 00 01 00
header_size_le: u32le
little endian
header_crc32: u32le
CRC32 of the header with crc32 section zeroed
reserved: u32le
must be 0
current_lba: u64le
For main header, 1
backup_lba: u64le
LBA for backup header
first_usable: u64le
First usable LBA for partitions (primary table last LBA + 1)
last_usable: u64le
Last usable LBA (secondary partition table first LBA - 1)
disk_guid: Uuid
UUID of the disk
part_start_lba: u64le
Starting LBA of partition entries
num_parts: u32le
Number of partition entries
part_size: u32le
Size of a partition entry, usually 128
part_table_crc32: u32le
CRC32 of the partition table
Implementations§
source§impl 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§
source§impl PartialEq<GPTHeader> for GPTHeader
impl PartialEq<GPTHeader> for GPTHeader
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more