Struct seccompiler::SeccompCondition [−][src]
pub struct SeccompCondition { /* fields omitted */ }
Expand description
Condition that a syscall must match in order to satisfy a rule.
Implementations
pub 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::{SeccompCondition, SeccompCmpArgLen, SeccompCmpOp};
let condition =
SeccompCondition::new(0, SeccompCmpArgLen::Dword, SeccompCmpOp::Eq, 1).unwrap();
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more