pub enum SecurityClass {
S0Legacy,
S2Unauthenticated,
S2Authenticated,
S2AccessControl,
}Expand description
A Z-Wave security class, the unit in which network keys are granted.
Variants§
S0Legacy
Security 0, the legacy scheme.
S2Unauthenticated
S2 Unauthenticated.
S2Authenticated
S2 Authenticated (needs the DSK PIN).
S2AccessControl
S2 Access Control (needs the DSK PIN; locks and garage doors).
Implementations§
Source§impl SecurityClass
impl SecurityClass
Sourcepub const HIGHEST_FIRST: [SecurityClass; 4]
pub const HIGHEST_FIRST: [SecurityClass; 4]
Every class, highest first: the order in which a receiver tries keys.
Sourcepub const fn key_bit(self) -> u8
pub const fn key_bit(self) -> u8
The bit for this class in the KEX “requested/granted keys” byte.
Sourcepub const fn from_key_bit(bit: u8) -> Option<SecurityClass>
pub const fn from_key_bit(bit: u8) -> Option<SecurityClass>
The class for a single KEX key bit.
Sourcepub fn from_key_bits(bits: u8) -> Vec<SecurityClass>
pub fn from_key_bits(bits: u8) -> Vec<SecurityClass>
The classes set in a KEX keys byte, highest first. Unknown bits are ignored.
Sourcepub fn to_key_bits(classes: &[SecurityClass]) -> u8
pub fn to_key_bits(classes: &[SecurityClass]) -> u8
The KEX keys byte for a set of classes.
Trait Implementations§
Source§impl Clone for SecurityClass
impl Clone for SecurityClass
impl Copy for SecurityClass
Source§impl Debug for SecurityClass
impl Debug for SecurityClass
Source§impl<'de> Deserialize<'de> for SecurityClass
impl<'de> Deserialize<'de> for SecurityClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SecurityClass
impl Display for SecurityClass
impl Eq for SecurityClass
Source§impl Hash for SecurityClass
impl Hash for SecurityClass
Source§impl Ord for SecurityClass
impl Ord for SecurityClass
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SecurityClass
impl PartialEq for SecurityClass
Source§impl PartialOrd for SecurityClass
impl PartialOrd for SecurityClass
Source§impl Serialize for SecurityClass
impl Serialize for SecurityClass
impl StructuralPartialEq for SecurityClass
Auto Trait Implementations§
impl Freeze for SecurityClass
impl RefUnwindSafe for SecurityClass
impl Send for SecurityClass
impl Sync for SecurityClass
impl Unpin for SecurityClass
impl UnsafeUnpin for SecurityClass
impl UnwindSafe for SecurityClass
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