Trait VmmNvramStorage

Source
pub trait VmmNvramStorage:
    NvramStorage
    + Inspect
    + SaveRestore<SavedState = <InMemoryNvram as SaveRestore>::SavedState> { }

Trait Implementations§

Source§

impl NvramStorage for Box<dyn VmmNvramStorage>

Source§

fn get_variable<'life0, 'life1, 'async_trait>( &'life0 mut self, name: &'life1 Ucs2LeSlice, vendor: Guid, ) -> Pin<Box<dyn Future<Output = Result<Option<(u32, Vec<u8>, EFI_TIME)>, NvramStorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the attr + data of the variable identified by name + vendor.
Source§

fn set_variable<'life0, 'life1, 'async_trait>( &'life0 mut self, name: &'life1 Ucs2LeSlice, vendor: Guid, attr: u32, data: Vec<u8>, timestamp: EFI_TIME, ) -> Pin<Box<dyn Future<Output = Result<(), NvramStorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set the value of variable identified by name + vendor to the provided attr + data. Read more
Source§

fn append_variable<'life0, 'life1, 'async_trait>( &'life0 mut self, name: &'life1 Ucs2LeSlice, vendor: Guid, data: Vec<u8>, timestamp: EFI_TIME, ) -> Pin<Box<dyn Future<Output = Result<bool, NvramStorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Append data to a variable identified by name + vendor from the Nvram storage. Read more
Source§

fn remove_variable<'life0, 'life1, 'async_trait>( &'life0 mut self, name: &'life1 Ucs2LeSlice, vendor: Guid, ) -> Pin<Box<dyn Future<Output = Result<bool, NvramStorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove a variable identified by name + vendor from the Nvram storage. Read more
Source§

fn next_variable<'life0, 'life1, 'async_trait>( &'life0 mut self, name_vendor: Option<(&'life1 Ucs2LeSlice, Guid)>, ) -> Pin<Box<dyn Future<Output = Result<NextVariable, NvramStorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the variable key immediately after the variable identified by name + vendor. If name_vendor is None, return the first variable.
Source§

fn is_empty<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<bool, NvramStorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return true if the underlying store doesn’t contain any vars
Source§

impl SaveRestore for Box<dyn VmmNvramStorage<SavedState = <InMemoryNvram as SaveRestore>::SavedState>>

Source§

type SavedState = <InMemoryNvram as SaveRestore>::SavedState

The concrete saved state type.
Source§

fn save(&mut self) -> Result<Self::SavedState, SaveError>

Saves the object’s state.
Source§

fn restore(&mut self, state: Self::SavedState) -> Result<(), RestoreError>

Restores the object’s state.

Implementors§

Source§

impl<T> VmmNvramStorage for T
where T: NvramStorage + Inspect + SaveRestore<SavedState = <InMemoryNvram as SaveRestore>::SavedState>,