#[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<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
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: ResourceDialect> Decode<BrEdrSecurityMode, D> for BrEdrSecurityMode
impl<D: ResourceDialect> Decode<BrEdrSecurityMode, D> for BrEdrSecurityMode
Source§impl<D: ResourceDialect> Encode<BrEdrSecurityMode, D> for BrEdrSecurityMode
impl<D: ResourceDialect> Encode<BrEdrSecurityMode, D> for BrEdrSecurityMode
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 moreimpl Copy for BrEdrSecurityMode
impl Eq for BrEdrSecurityMode
impl StructuralPartialEq for BrEdrSecurityMode
Auto Trait Implementations§
impl Freeze for BrEdrSecurityMode
impl RefUnwindSafe for BrEdrSecurityMode
impl Send for BrEdrSecurityMode
impl Sync for BrEdrSecurityMode
impl Unpin for BrEdrSecurityMode
impl UnwindSafe for BrEdrSecurityMode
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
)