pub trait NvramServicesExt {
    // Required methods
    fn get_variable<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        vendor: Guid,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(u32, Vec<u8>), (EfiStatus, Option<NvramError>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_variable_ucs2<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        vendor: Guid,
        name: &'life1 Ucs2LeSlice,
    ) -> Pin<Box<dyn Future<Output = Result<(u32, Vec<u8>), (EfiStatus, Option<NvramError>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_variable<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        vendor: Guid,
        name: &'life1 str,
        attr: u32,
        data: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<(), (EfiStatus, Option<NvramError>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_variable_ucs2<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        vendor: Guid,
        name: &'life1 Ucs2LeSlice,
        attr: u32,
        data: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<(), (EfiStatus, Option<NvramError>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Extension trait around NvramServices that makes it easier to use the API outside the context of the UEFI device.

This trait provides various helper methods that make it easier to get/set nvram variables without worrying about the nitty-gritty details of UCS-2 string encoding, pointer sizes/nullness, etc…

Required Methods§

source

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

Get a variable identified by name (as a Rust string) + vendor, returning the variable’s attributes and data.

source

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

Get a variable identified by name (as a UCS-2 string) + vendor, returning the variable’s attributes and data.

source

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

Set a variable identified by name (as a Rust string) + vendor with the specified attr and data.

source

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

Set a variable identified by name (as a UCS-2 string) + vendor with the specified attr and data.

Implementors§