[−][src]Struct sunrise_fs::detail::gpt::GPTHeader
The header of a GPT table.
Fields
signature: u64
Signature of a GPT header.
revision: u32
GPT revision.
header_size: u32
Header size.
crc32: u32
CRC over the header.
reserved: u32
Reserved field.
current_lba: u64
The LBA of this header.
backup_lba: u64
The LBA of the backup header.
first_usable: u64
The first usable LBA. (partition table entries)
last_usable: u64
The last usable LBA.
disk_guid: RawUUID
The GUID of this disk.
partition_table_start: u64
The LBA of the first partition entry.
partition_entry_count: u32
The count of partition entries.
partition_entry_size: u32
The size of a partition entry.
partition_table_crc32: u32
The 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(
storage_device: &mut dyn IStorage<Error = Error>,
lba_index: u64
) -> LibUserResult<Self>
[src]
storage_device: &mut dyn IStorage<Error = Error>,
lba_index: u64
) -> LibUserResult<Self>
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 is_valid(&self) -> bool
[src]
Check if the GPT Header looks valid.
pub fn set_disk_guid(&mut self, uuid: Uuid)
[src]
Set the disk GUID.
pub fn get_disk_guid(&self) -> Uuid
[src]
Get 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> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
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>,