#[repr(u32)]pub enum BrEdrSecurityMode {
    Mode4 = 1,
    SecureConnectionsOnly = 2,
}Expand description
The BR/EDR Security Mode of a BT 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.4 Vol. 3, Part C 5.2.2 for more details.
Variants§
Mode4 = 1
In BR/EDR Security Mode 4, communication will be authenticated and encrypted using the lowest common denominator algorithm between the pairing devices. Note that this means key generation, authentication, and encryption algorithms used may be weaker than Secure Connections if SC is not supported.
SecureConnectionsOnly = 2
In Secure Connections Only mode, the device will reject connections that do not support Secure Connections, and longer key lengths will be enforced.
SC Only mode also attempts to enforce user confirmation of the expected peer. Devices that do not have a display (e.g. headsets) do not typically support SC for this reason.
Implementations§
Source§impl BrEdrSecurityMode
 
impl BrEdrSecurityMode
pub fn from_primitive(prim: u32) -> Option<BrEdrSecurityMode>
pub const fn into_primitive(self) -> u32
Trait Implementations§
Source§impl Clone for BrEdrSecurityMode
 
impl Clone for BrEdrSecurityMode
Source§fn clone(&self) -> BrEdrSecurityMode
 
fn clone(&self) -> BrEdrSecurityMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BrEdrSecurityMode
 
impl Debug for BrEdrSecurityMode
Source§impl<D> Decode<BrEdrSecurityMode, D> for BrEdrSecurityModewhere
    D: ResourceDialect,
 
impl<D> Decode<BrEdrSecurityMode, D> for BrEdrSecurityModewhere
    D: ResourceDialect,
Source§fn new_empty() -> BrEdrSecurityMode
 
fn new_empty() -> BrEdrSecurityMode
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<BrEdrSecurityMode, D> for BrEdrSecurityModewhere
    D: ResourceDialect,
 
impl<D> Encode<BrEdrSecurityMode, D> for BrEdrSecurityModewhere
    D: ResourceDialect,
Source§impl Hash for BrEdrSecurityMode
 
impl Hash for BrEdrSecurityMode
Source§impl Ord for BrEdrSecurityMode
 
impl Ord for BrEdrSecurityMode
Source§fn cmp(&self, other: &BrEdrSecurityMode) -> Ordering
 
fn cmp(&self, other: &BrEdrSecurityMode) -> 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 BrEdrSecurityMode
 
impl PartialEq for BrEdrSecurityMode
Source§impl PartialOrd for BrEdrSecurityMode
 
impl PartialOrd for BrEdrSecurityMode
Source§impl TypeMarker for BrEdrSecurityMode
 
impl TypeMarker for BrEdrSecurityMode
Source§type Owned = BrEdrSecurityMode
 
type Owned = BrEdrSecurityMode
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 BrEdrSecurityMode
 
impl ValueTypeMarker for BrEdrSecurityMode
Source§type Borrowed<'a> = BrEdrSecurityMode
 
type Borrowed<'a> = BrEdrSecurityMode
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
    value: &<BrEdrSecurityMode as TypeMarker>::Owned,
) -> <BrEdrSecurityMode as ValueTypeMarker>::Borrowed<'_>
 
fn borrow( value: &<BrEdrSecurityMode as TypeMarker>::Owned, ) -> <BrEdrSecurityMode as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.