pub struct GptEntry {
pub type_guid: Guid,
pub unique_guid: Guid,
pub first_lba: u64,
pub last_lba: u64,
pub attributes: u64,
pub name: String,
}Expand description
A parsed GPT partition entry.
Fields§
§type_guid: GuidPartition type GUID (all-zero = unused).
unique_guid: GuidUnique partition GUID.
first_lba: u64First LBA of the partition (inclusive).
last_lba: u64Last LBA of the partition (inclusive).
attributes: u64Attribute flags bitfield.
name: StringPartition name (decoded from UTF-16LE, trailing NULs stripped).
Implementations§
Source§impl GptEntry
impl GptEntry
Sourcepub fn parse(bytes: &[u8]) -> Result<GptEntry, Error>
pub fn parse(bytes: &[u8]) -> Result<GptEntry, Error>
Parse one entry from the first 128 bytes of bytes.
§Errors
Error::TooShort if bytes is under MIN_ENTRY_SIZE.
Sourcepub fn is_used(&self) -> bool
pub fn is_used(&self) -> bool
true when the entry’s type GUID is non-zero (an in-use partition).
Sourcepub fn type_name(&self) -> Option<&'static str>
pub fn type_name(&self) -> Option<&'static str>
Human-readable name for this partition’s type GUID, from the
forensicnomicon knowledge base. None for an unrecognised type.
Sourcepub fn attribute_names(&self) -> Vec<&'static str>
pub fn attribute_names(&self) -> Vec<&'static str>
Decode the entry’s attribute flags into human-readable names (bit order),
e.g. ["hidden", "no-automount"]. Uses the forensicnomicon knowledge base.
Trait Implementations§
impl Eq for GptEntry
impl StructuralPartialEq for GptEntry
Auto Trait Implementations§
impl Freeze for GptEntry
impl RefUnwindSafe for GptEntry
impl Send for GptEntry
impl Sync for GptEntry
impl Unpin for GptEntry
impl UnsafeUnpin for GptEntry
impl UnwindSafe for GptEntry
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