pub struct SyscallName(/* private fields */);
Expand description
A UTF-8 NUL-terminated name of a syscall with static lifetime.
Implementations§
Source§impl SyscallName
impl SyscallName
Sourcepub const fn from_c_str(c_str: &'static CStr) -> Result<Self, Utf8Error>
pub const fn from_c_str(c_str: &'static CStr) -> Result<Self, Utf8Error>
Converts a static C string to a system call name, if it is UTF-8.
Sourcepub const unsafe fn from_bytes_with_nul(ptr: *const u8) -> Self
pub const unsafe fn from_bytes_with_nul(ptr: *const u8) -> Self
Converts a raw UTF-8 C string pointer to a system call name.
§Safety
The pointer must reference a static null-terminated UTF-8 string.
pub fn as_ptr(&self) -> *const u8
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl AsRef<str> for SyscallName
impl AsRef<str> for SyscallName
Source§impl Clone for SyscallName
impl Clone for SyscallName
Source§fn clone(&self) -> SyscallName
fn clone(&self) -> SyscallName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SyscallName
impl Debug for SyscallName
impl Copy for SyscallName
Auto Trait Implementations§
impl Freeze for SyscallName
impl RefUnwindSafe for SyscallName
impl !Send for SyscallName
impl !Sync for SyscallName
impl Unpin for SyscallName
impl UnwindSafe for SyscallName
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