pub struct SyscallMap<'a> { /* private fields */ }Expand description
Static syscall map using lifetimes for compile-time and borrowed data Supports both static (compile-time) and dynamic (runtime) syscall lists via lifetimes
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> UnsafeUnpin 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