Enum LeSecurityMode
#[repr(u32)]pub enum LeSecurityMode {
Mode1 = 1,
SecureConnectionsOnly = 2,
}
Expand description
The LE Security Mode of a BLE device determines the possible security properties of the device. The security mode does not make specific guarantees about the current security properties of a device’s connections; it sets restrictions on the allowable security properties. See Core Spec v5.2 Vol. 3, Part C 10.2 for more details.
Variants§
Mode1 = 1
In LE Security Mode 1, communication is secured by encryption, and BLE-based services may specify varying requirements for authentication, key size, or Secure Connections protection on the encryption keys.
SecureConnectionsOnly = 2
In Secure Connections Only mode, all secure communication must use 128 bit, authenticated, and LE Secure Connections-generated encryption keys. If these encryption key properties cannot be satisfied by a device due to system constraints, any connection involving such a device will not be able to secure the link at all. This mode does not prevent unencrypted communication; it merely enforces stricter policies on all encrypted communication.
Implementations§
§impl LeSecurityMode
impl LeSecurityMode
pub fn from_primitive(prim: u32) -> Option<LeSecurityMode>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
§impl Clone for LeSecurityMode
impl Clone for LeSecurityMode
§fn clone(&self) -> LeSecurityMode
fn clone(&self) -> LeSecurityMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for LeSecurityMode
impl Debug for LeSecurityMode
§impl<D> Decode<LeSecurityMode, D> for LeSecurityModewhere
D: ResourceDialect,
impl<D> Decode<LeSecurityMode, D> for LeSecurityModewhere
D: ResourceDialect,
§fn new_empty() -> LeSecurityMode
fn new_empty() -> LeSecurityMode
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<LeSecurityMode, D> for LeSecurityModewhere
D: ResourceDialect,
impl<D> Encode<LeSecurityMode, D> for LeSecurityModewhere
D: ResourceDialect,
§impl Hash for LeSecurityMode
impl Hash for LeSecurityMode
§impl Ord for LeSecurityMode
impl Ord for LeSecurityMode
§impl PartialEq for LeSecurityMode
impl PartialEq for LeSecurityMode
§impl PartialOrd for LeSecurityMode
impl PartialOrd for LeSecurityMode
§impl TypeMarker for LeSecurityMode
impl TypeMarker for LeSecurityMode
§type Owned = LeSecurityMode
type Owned = LeSecurityMode
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for LeSecurityMode
impl ValueTypeMarker for LeSecurityMode
§type Borrowed<'a> = LeSecurityMode
type Borrowed<'a> = LeSecurityMode
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<LeSecurityMode as TypeMarker>::Owned,
) -> <LeSecurityMode as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<LeSecurityMode as TypeMarker>::Owned, ) -> <LeSecurityMode as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.