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 duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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
impl Eq for SeccompCondition
impl StructuralPartialEq for SeccompCondition
Auto Trait Implementations§
impl Freeze for SeccompCondition
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