Enum libseccomp::ScmpCompareOp
source · [−]#[non_exhaustive]
pub enum ScmpCompareOp {
NotEqual,
Less,
LessOrEqual,
Equal,
GreaterEqual,
Greater,
MaskedEqual(u64),
}
Expand description
Represents a comparison operator which can be used in a filter rule.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotEqual
Not equal
Less
Less than
LessOrEqual
Less than or equal
Equal
Equal
GreaterEqual
Greater than or equal
Greater
Greater than
MaskedEqual(u64)
Tuple Fields
0: u64
mask
Masked equality
This works like Equal
with the exception that the syscall argument is
masked with mask
via an bitwise AND (i.e. you can check specific bits in the
argument).
Trait Implementations
sourceimpl Clone for ScmpCompareOp
impl Clone for ScmpCompareOp
sourcefn clone(&self) -> ScmpCompareOp
fn clone(&self) -> ScmpCompareOp
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 moresourceimpl Debug for ScmpCompareOp
impl Debug for ScmpCompareOp
sourceimpl FromStr for ScmpCompareOp
impl FromStr for ScmpCompareOp
sourcefn from_str(cmp_op: &str) -> Result<Self, SeccompError>
fn from_str(cmp_op: &str) -> Result<Self, SeccompError>
Converts string seccomp comparison operator to ScmpCompareOp
.
Arguments
cmp_op
- A string comparison operator, e.g.SCMP_CMP_*
.
See the seccomp_rule_add(3)
man page for details on valid comparison operator values.
Errors
If an invalid comparison operator is specified, an error will be returned.
type Err = SeccompError
type Err = SeccompError
The associated error which can be returned from parsing.
sourceimpl Hash for ScmpCompareOp
impl Hash for ScmpCompareOp
sourceimpl PartialEq<ScmpCompareOp> for ScmpCompareOp
impl PartialEq<ScmpCompareOp> for ScmpCompareOp
sourcefn eq(&self, other: &ScmpCompareOp) -> bool
fn eq(&self, other: &ScmpCompareOp) -> bool
impl Copy for ScmpCompareOp
impl Eq for ScmpCompareOp
impl StructuralEq for ScmpCompareOp
impl StructuralPartialEq for ScmpCompareOp
Auto Trait Implementations
impl RefUnwindSafe for ScmpCompareOp
impl Send for ScmpCompareOp
impl Sync for ScmpCompareOp
impl Unpin for ScmpCompareOp
impl UnwindSafe for ScmpCompareOp
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