StandardRuntimeServices

Struct StandardRuntimeServices 

Source
pub struct StandardRuntimeServices<'a> { /* private fields */ }
Expand description

The UEFI spec runtime services. It wraps an AtomicPtr around efi::RuntimeServices

UEFI Spec Documentation: 8. Services - RuntimeServices

Implementations§

Source§

impl<'a> StandardRuntimeServices<'a>

Source

pub const fn new(efi_runtime_services: &'a RuntimeServices) -> Self

Create a new StandardRuntimeServices with the provided efi::RuntimeServices.

Source

pub const fn new_uninit() -> Self

Create a new StandardRuntimeServices that is uninitialized. The struct need to be initialize later with Self::initialize, otherwise, subsequent call will panic.

Source

pub fn initialize(&'a self, efi_runtime_services: &'a RuntimeServices)

Initialize the StandardRuntimeServices with a reference to efi::RuntimeServices.

§Debug asserts

This function will assert on debug if already initialized.

Trait Implementations§

Source§

impl<'a> Debug for StandardRuntimeServices<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RuntimeServices for StandardRuntimeServices<'_>

Source§

unsafe fn set_variable_unchecked( &self, name: &mut [u16], namespace: &Guid, attributes: u32, data: &[u8], ) -> Result<(), Status>

Set’s a UEFI variable Read more
Source§

unsafe fn get_variable_unchecked( &self, name: &mut [u16], namespace: &Guid, data: Option<&mut [u8]>, ) -> GetVariableStatus

Gets a UEFI variable Read more
Source§

unsafe fn get_next_variable_name_unchecked( &self, prev_name: &[u16], prev_namespace: &Guid, next_name: &mut Vec<u16>, next_namespace: &mut Guid, ) -> Result<(), Status>

Gets the UEFI variable name after the one provided. Read more
Source§

fn query_variable_info(&self, attributes: u32) -> Result<VariableInfo, Status>

Queries variable information for given UEFI variable attributes. Read more
Source§

fn set_variable<T>( &self, name: &[u16], namespace: &Guid, attributes: u32, data: &T, ) -> Result<(), Status>
where T: AsRef<[u8]> + 'static,

Sets a UEFI variable. Read more
Source§

fn get_variable<T>( &self, name: &[u16], namespace: &Guid, size_hint: Option<usize>, ) -> Result<(T, u32), Status>
where T: TryFrom<Vec<u8>> + 'static,

Gets a UEFI variable. Read more
Source§

fn get_variable_size_and_attributes( &self, name: &[u16], namespace: &Guid, ) -> Result<(usize, u32), Status>

Helper function to get a UEFI variable’s size and attributes
Source§

fn get_next_variable_name( &self, prev_name: &[u16], prev_namespace: &Guid, ) -> Result<(Vec<u16>, Guid), Status>

Gets the name and namespace of the UEFI variable after the one provided. Read more
Source§

impl Send for StandardRuntimeServices<'static>

SAFETY: When the lifetime is 'static, the pointer is guaranteed to stay valid.

Source§

impl Sync for StandardRuntimeServices<'static>

SAFETY: StandardRuntimeServices uses an atomic ptr to access the RuntimeServices.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.