pub enum SecurityLevel {
NoAuthNoPriv,
AuthNoPriv,
AuthPriv,
}Expand description
SNMPv3 security level.
The variants are ordered from least secure to most secure,
supporting VACM-style level comparisons (e.g., actual >= required).
Variants§
NoAuthNoPriv
No authentication, no privacy
AuthNoPriv
Authentication only
AuthPriv
Authentication and privacy (encryption)
Implementations§
Source§impl SecurityLevel
impl SecurityLevel
Sourcepub fn from_flags(flags: u8) -> Option<Self>
pub fn from_flags(flags: u8) -> Option<Self>
Decode from msgFlags byte.
Sourcepub fn requires_auth(self) -> bool
pub fn requires_auth(self) -> bool
Check if authentication is required.
Sourcepub fn requires_priv(self) -> bool
pub fn requires_priv(self) -> bool
Check if privacy (encryption) is required.
Trait Implementations§
Source§impl Clone for SecurityLevel
impl Clone for SecurityLevel
Source§fn clone(&self) -> SecurityLevel
fn clone(&self) -> SecurityLevel
Returns a duplicate 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 SecurityLevel
impl Debug for SecurityLevel
Source§impl Ord for SecurityLevel
impl Ord for SecurityLevel
Source§fn cmp(&self, other: &SecurityLevel) -> Ordering
fn cmp(&self, other: &SecurityLevel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecurityLevel
impl PartialEq for SecurityLevel
Source§impl PartialOrd for SecurityLevel
impl PartialOrd for SecurityLevel
impl Copy for SecurityLevel
impl Eq for SecurityLevel
impl StructuralPartialEq for SecurityLevel
Auto Trait Implementations§
impl Freeze for SecurityLevel
impl RefUnwindSafe for SecurityLevel
impl Send for SecurityLevel
impl Sync for SecurityLevel
impl Unpin for SecurityLevel
impl UnwindSafe for SecurityLevel
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