pub struct Syscall { /* private fields */ }Expand description
A Syscall, which can be constructed from either the number, or from the name.
Implementations§
Source§impl Syscall
impl Syscall
Sourcepub fn from_number(code: c_int) -> Self
pub fn from_number(code: c_int) -> Self
Construct a Syscall from the number. No validation is performed.
Sourcepub fn from_name(name: &str) -> Result<Self, Error>
pub fn from_name(name: &str) -> Result<Self, Error>
Construct a Syscall from a name, returning Error if libseccomp could not resolve the name.
Sourcepub fn with_arch(name: &str, arch: u32) -> Result<Self, Error>
pub fn with_arch(name: &str, arch: u32) -> Result<Self, Error>
Resolve a name to a syscall number for a specific architecture. Fails if libseccomp could not resolve the name.
Sourcepub fn get_name(num: c_int) -> Result<String, Error>
pub fn get_name(num: c_int) -> Result<String, Error>
Get the name for a syscall on the native architecture.
Sourcepub fn get_name_arch(num: c_int, arch: u32) -> Result<String, Error>
pub fn get_name_arch(num: c_int, arch: u32) -> Result<String, Error>
Get the name for a syscall on the provided architecture.
Sourcepub fn get_number(&self) -> i32
pub fn get_number(&self) -> i32
Get the numerical value of the syscall.
Trait Implementations§
impl Copy for Syscall
Auto Trait Implementations§
impl Freeze for Syscall
impl RefUnwindSafe for Syscall
impl Send for Syscall
impl Sync for Syscall
impl Unpin for Syscall
impl UnwindSafe for Syscall
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