pub struct BLESecurity { /* private fields */ }Implementations§
Source§impl BLESecurity
impl BLESecurity
Sourcepub fn set_auth(&mut self, auth_req: AuthReq) -> &mut Self
pub fn set_auth(&mut self, auth_req: AuthReq) -> &mut Self
Set the authorization mode for this device.
Sourcepub fn get_passkey(&self) -> u32
pub fn get_passkey(&self) -> u32
Get the current passkey used for pairing.
Sourcepub fn set_passkey(&mut self, passkey: u32) -> &mut Self
pub fn set_passkey(&mut self, passkey: u32) -> &mut Self
Set the passkey the server will ask for when pairing.
- The passkey will always be exactly 6 digits. Setting the passkey to 1234 will require the user to provide ‘001234’
- a dynamic passkey can also be set by
crate::BLEServer::on_passkey_request
Sourcepub fn set_io_cap(&mut self, iocap: SecurityIOCap) -> &mut Self
pub fn set_io_cap(&mut self, iocap: SecurityIOCap) -> &mut Self
Set the Input/Output capabilities of this device.
Sourcepub fn set_security_init_key(&mut self, init_key: PairKeyDist) -> &mut Self
pub fn set_security_init_key(&mut self, init_key: PairKeyDist) -> &mut Self
If we are the initiator of the security procedure this sets the keys we will distribute.
Sourcepub fn set_security_resp_key(&mut self, resp_key: PairKeyDist) -> &mut Self
pub fn set_security_resp_key(&mut self, resp_key: PairKeyDist) -> &mut Self
Set the keys we are willing to accept during pairing.
Sourcepub fn resolve_rpa(&mut self) -> &mut Self
pub fn resolve_rpa(&mut self) -> &mut Self
Set up for pairing in RPA(Resolvable Private Address).
Auto Trait Implementations§
impl Freeze for BLESecurity
impl RefUnwindSafe for BLESecurity
impl Send for BLESecurity
impl Sync for BLESecurity
impl Unpin for BLESecurity
impl UnsafeUnpin for BLESecurity
impl UnwindSafe for BLESecurity
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more