Struct seccompiler::SeccompCondition
source · pub struct SeccompCondition { /* private fields */ }
Expand description
Condition that a syscall must match in order to satisfy a rule.
Implementations§
source§impl 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§
source§impl Clone for SeccompCondition
impl Clone for SeccompCondition
source§fn clone(&self) -> SeccompCondition
fn clone(&self) -> SeccompCondition
Returns a copy 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 SeccompCondition
impl Debug for SeccompCondition
source§impl PartialEq for SeccompCondition
impl PartialEq for SeccompCondition
source§fn 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 ==
.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§
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