Struct seccompiler::SeccompCondition
source · [−]pub struct SeccompCondition { /* private fields */ }
Expand description
Condition that a syscall must match in order to satisfy a rule.
Implementations
sourceimpl SeccompCondition
impl SeccompCondition
sourcepub fn new(
arg_index: u8,
arg_len: SeccompCmpArgLen,
operator: SeccompCmpOp,
value: u64
) -> Result<Self, Error>
pub fn new(
arg_index: u8,
arg_len: SeccompCmpArgLen,
operator: SeccompCmpOp,
value: u64
) -> Result<Self, Error>
Creates a new SeccompCondition
.
Arguments
arg_index
- Index of the argument that is to be compared.arg_len
- Length of the argument value that is to be compared.operator
- Comparison operator to perform.value
- The value that will be compared with the argument value of the syscall.
Example
use seccompiler::{SeccompCmpArgLen, SeccompCmpOp, SeccompCondition};
let condition = SeccompCondition::new(0, SeccompCmpArgLen::Dword, SeccompCmpOp::Eq, 1).unwrap();
Trait Implementations
sourceimpl Clone for SeccompCondition
impl Clone for SeccompCondition
sourcefn clone(&self) -> SeccompCondition
fn clone(&self) -> SeccompCondition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SeccompCondition
impl Debug for SeccompCondition
sourceimpl PartialEq<SeccompCondition> for SeccompCondition
impl PartialEq<SeccompCondition> for SeccompCondition
sourcefn eq(&self, other: &SeccompCondition) -> bool
fn eq(&self, other: &SeccompCondition) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for SeccompCondition
impl StructuralEq for SeccompCondition
impl StructuralPartialEq for SeccompCondition
Auto Trait Implementations
impl RefUnwindSafe for SeccompCondition
impl Send for SeccompCondition
impl Sync for SeccompCondition
impl Unpin for SeccompCondition
impl UnwindSafe for SeccompCondition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more