#[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§
Source§impl LeSecurityMode
impl LeSecurityMode
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
Source§impl Clone for LeSecurityMode
impl Clone for LeSecurityMode
Source§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 moreSource§impl Debug for LeSecurityMode
impl Debug for LeSecurityMode
Source§impl<D: ResourceDialect> Decode<LeSecurityMode, D> for LeSecurityMode
impl<D: ResourceDialect> Decode<LeSecurityMode, D> for LeSecurityMode
Source§impl<D: ResourceDialect> Encode<LeSecurityMode, D> for LeSecurityMode
impl<D: ResourceDialect> Encode<LeSecurityMode, D> for LeSecurityMode
Source§impl Hash for LeSecurityMode
impl Hash for LeSecurityMode
Source§impl Ord for LeSecurityMode
impl Ord for LeSecurityMode
Source§fn cmp(&self, other: &LeSecurityMode) -> Ordering
fn cmp(&self, other: &LeSecurityMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LeSecurityMode
impl PartialEq for LeSecurityMode
Source§impl PartialOrd for LeSecurityMode
impl PartialOrd for LeSecurityMode
Source§impl TypeMarker for LeSecurityMode
impl TypeMarker for LeSecurityMode
Source§type Owned = LeSecurityMode
type Owned = LeSecurityMode
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§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 moreSource§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.Source§impl ValueTypeMarker for LeSecurityMode
impl ValueTypeMarker for LeSecurityMode
Source§type Borrowed<'a> = LeSecurityMode
type Borrowed<'a> = LeSecurityMode
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for LeSecurityMode
impl Eq for LeSecurityMode
impl StructuralPartialEq for LeSecurityMode
Auto Trait Implementations§
impl Freeze for LeSecurityMode
impl RefUnwindSafe for LeSecurityMode
impl Send for LeSecurityMode
impl Sync for LeSecurityMode
impl Unpin for LeSecurityMode
impl UnwindSafe for LeSecurityMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)