pub struct HclCompatNvram<S> { /* private fields */ }
Expand description
Stores Nvram variables in files as a packed byte-buffer of structs + associated variable length data.
Implementations§
Source§impl<S: StorageBackend> HclCompatNvram<S>
impl<S: StorageBackend> HclCompatNvram<S>
Sourcepub fn new(storage: S, quirks: Option<HclCompatNvramQuirks>) -> Self
pub fn new(storage: S, quirks: Option<HclCompatNvramQuirks>) -> Self
Create a new HclCompatNvram
Trait Implementations§
Source§impl<S> Inspect for HclCompatNvram<S>
impl<S> Inspect for HclCompatNvram<S>
Source§impl<S: StorageBackend> NvramStorage for HclCompatNvram<S>
impl<S: StorageBackend> NvramStorage for HclCompatNvram<S>
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,
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,
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,
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,
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,
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,
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,
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,
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.Auto Trait Implementations§
impl<S> Freeze for HclCompatNvram<S>where
S: Freeze,
impl<S> RefUnwindSafe for HclCompatNvram<S>where
S: RefUnwindSafe,
impl<S> Send for HclCompatNvram<S>where
S: Send,
impl<S> Sync for HclCompatNvram<S>where
S: Sync,
impl<S> Unpin for HclCompatNvram<S>where
S: Unpin,
impl<S> UnwindSafe for HclCompatNvram<S>where
S: UnwindSafe,
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