[−][src]Struct disk_initializer::gpt::GPTHeader
The header of a GPT table.
Fields
signature: u64Signature of a GPT header.
revision: u32GPT revision.
header_size: u32Header size.
crc32: u32CRC over the header.
reserved: u32Reserved field.
current_lba: u64The LBA of this header.
backup_lba: u64The LBA of the backup header.
first_usable: u64The first usable LBA. (partition table entries)
last_usable: u64The last usable LBA.
disk_guid: RawUUIDThe GUID of this disk.
partition_table_start: u64The LBA of the first partition entry.
partition_entry_count: u32The count of partition entries.
partition_entry_size: u32The size of a partition entry.
partition_table_crc32: u32The CRC over all partition entries.
Implementations
impl GPTHeader[src]
pub const MAGIC: u64[src]
The magic of a GPT header ("EFI PART")
pub fn from_storage_device<E: Debug>(
storage_device: &mut dyn StorageDevice<Error = E>,
lba_index: u64
) -> Result<Self, E>[src]
storage_device: &mut dyn StorageDevice<Error = E>,
lba_index: u64
) -> Result<Self, E>
Read the GPT header from the disk
pub fn from_bytes(bytes: [u8; 92]) -> Self[src]
Create a GPTHeader from a raw array.
pub fn read(&mut self, bytes: [u8; 92])[src]
Read the content of a raw array into a GPTHeader.
pub fn write(&self, include_crc: bool) -> [u8; 92][src]
Conver the structure data to a raw array.
pub fn update_header_crc(&mut self)[src]
Update the CRC32 of the header.
Note:
This should be called after having manually update the CRC32 of the partition table.
pub fn set_disk_guid(&mut self, uuid: Uuid)[src]
Set the disk GUID.
Trait Implementations
impl Clone for GPTHeader[src]
impl Copy for GPTHeader[src]
impl Debug for GPTHeader[src]
impl Default for GPTHeader[src]
impl Eq for GPTHeader[src]
impl PartialEq<GPTHeader> for GPTHeader[src]
impl StructuralEq for GPTHeader[src]
impl StructuralPartialEq for GPTHeader[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,