pub struct SyscallMap<'a> { /* private fields */ }Implementations§
Source§impl<'a> SyscallMap<'a>
impl<'a> SyscallMap<'a>
Sourcepub const fn from_entries(entries: &'a [(u32, &'a str)]) -> Self
pub const fn from_entries(entries: &'a [(u32, &'a str)]) -> Self
Create from a pre-sorted slice of (hash, name) pairs Works for both static and dynamic lifetimes
pub const fn get(&self, hash: u32) -> Option<&'a str>
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<'a> From<&SyscallMap<'a>> for DynamicSyscallMap
Convert a static SyscallMap to a dynamic one
impl<'a> From<&SyscallMap<'a>> for DynamicSyscallMap
Convert a static SyscallMap to a dynamic one
Source§fn from(static_map: &SyscallMap<'a>) -> Self
fn from(static_map: &SyscallMap<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for SyscallMap<'a>
impl<'a> RefUnwindSafe for SyscallMap<'a>
impl<'a> Send for SyscallMap<'a>
impl<'a> Sync for SyscallMap<'a>
impl<'a> Unpin for SyscallMap<'a>
impl<'a> UnwindSafe for SyscallMap<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more