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>
impl<'a> StandardRuntimeServices<'a>
Sourcepub const fn new(efi_runtime_services: &'a RuntimeServices) -> Self
pub const fn new(efi_runtime_services: &'a RuntimeServices) -> Self
Create a new StandardRuntimeServices with the provided efi::RuntimeServices.
Sourcepub const fn new_uninit() -> Self
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.
Sourcepub fn initialize(&'a self, efi_runtime_services: &'a RuntimeServices)
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>
impl<'a> Debug for StandardRuntimeServices<'a>
Source§impl RuntimeServices for StandardRuntimeServices<'_>
impl RuntimeServices for StandardRuntimeServices<'_>
Source§unsafe fn set_variable_unchecked(
&self,
name: &mut [u16],
namespace: &Guid,
attributes: u32,
data: &[u8],
) -> Result<(), Status>
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
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>
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>
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>
fn set_variable<T>( &self, name: &[u16], namespace: &Guid, attributes: u32, data: &T, ) -> Result<(), Status>
Sets a UEFI variable. Read more
Source§fn get_variable<T>(
&self,
name: &[u16],
namespace: &Guid,
size_hint: Option<usize>,
) -> Result<(T, u32), Status>
fn get_variable<T>( &self, name: &[u16], namespace: &Guid, size_hint: Option<usize>, ) -> Result<(T, u32), Status>
Gets a UEFI variable. Read more
impl Send for StandardRuntimeServices<'static>
SAFETY: When the lifetime is 'static, the pointer is guaranteed to stay valid.
impl Sync for StandardRuntimeServices<'static>
SAFETY: StandardRuntimeServices uses an atomic ptr to access the RuntimeServices.
Auto Trait Implementations§
impl<'a> !Freeze for StandardRuntimeServices<'a>
impl<'a> RefUnwindSafe for StandardRuntimeServices<'a>
impl<'a> Unpin for StandardRuntimeServices<'a>
impl<'a> UnwindSafe for StandardRuntimeServices<'a>
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