pub struct MetadataEntry {
pub entry_type: u16,
pub value_type: u16,
pub version: u16,
pub data: Vec<u8>,
}Expand description
One FVE metadata entry (entry_type, value_type, version, and the raw
value data that follows the 8-byte entry header).
Fields§
§entry_type: u16Entry type (e.g. [ENTRY_TYPE_VMK]).
value_type: u16Value type (e.g. [VALUE_TYPE_AES_CCM]).
version: u16Entry version (typically 1).
data: Vec<u8>The value data following the 8-byte entry header.
Implementations§
Source§impl MetadataEntry
impl MetadataEntry
Sourcepub fn parse_sequence(data: &[u8]) -> Vec<MetadataEntry>
pub fn parse_sequence(data: &[u8]) -> Vec<MetadataEntry>
Parse a flat sequence of metadata entries from data.
Each entry is size(u16) | entry_type(u16) | value_type(u16) | version(u16) | value_data. Parsing stops on a size below the 8-byte
header, an entry that would run past the buffer, or the end of data —
never looping forever on a lying size.
Sourcepub fn nested(&self, offset: usize) -> Vec<MetadataEntry>
pub fn nested(&self, offset: usize) -> Vec<MetadataEntry>
Parse this entry’s value data (from offset) as a nested entry sequence.
Sourcepub fn protection_type(&self) -> Option<u16>
pub fn protection_type(&self) -> Option<u16>
The key-protection type of a VMK entry (protector type at value offset 26),
or None for a non-VMK entry.
Trait Implementations§
Source§impl Clone for MetadataEntry
impl Clone for MetadataEntry
Source§fn clone(&self) -> MetadataEntry
fn clone(&self) -> MetadataEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataEntry
impl Debug for MetadataEntry
impl Eq for MetadataEntry
Source§impl PartialEq for MetadataEntry
impl PartialEq for MetadataEntry
Source§fn eq(&self, other: &MetadataEntry) -> bool
fn eq(&self, other: &MetadataEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MetadataEntry
Auto Trait Implementations§
impl Freeze for MetadataEntry
impl RefUnwindSafe for MetadataEntry
impl Send for MetadataEntry
impl Sync for MetadataEntry
impl Unpin for MetadataEntry
impl UnsafeUnpin for MetadataEntry
impl UnwindSafe for MetadataEntry
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