Struct esp32_nimble::BLEDevice

source ·
pub struct BLEDevice { /* private fields */ }

Implementations§

source§

impl BLEDevice

source

pub fn init()

source

pub fn take() -> &'static mut Self

source

pub fn deinit() -> Result<(), EspError>

Shutdown the NimBLE stack/controller

source

pub fn deinit_full() -> Result<(), EspError>

Shutdown the NimBLE stack/controller server/advertising/scan will be reset.

source

pub fn get_scan(&self) -> &'static mut BLEScan

source

pub fn get_server(&self) -> &'static mut BLEServer

source

pub fn get_advertising(&self) -> &'static Mutex<BLEAdvertising>

source

pub fn set_power( &mut self, power_type: PowerType, power_level: PowerLevel ) -> Result<(), BLEError>

source

pub fn get_power(&self, power_type: PowerType) -> PowerLevel

source

pub fn bonded_addresses(&self) -> Result<Vec<BLEAddress>, BLEError>

Get the addresses of all bonded peer device.

source

pub fn delete_all_bonds(&self) -> Result<(), BLEError>

Deletes all bonding information.

source

pub fn delete_bond(&self, address: &BLEAddress) -> Result<(), BLEError>

Deletes a peer bond.

  • address: The address of the peer with which to delete bond info.
source

pub fn set_white_list( &mut self, white_list: &[BLEAddress] ) -> Result<(), BLEError>

source

pub fn security(&mut self) -> &mut BLESecurity

source

pub fn set_own_addr_type(&mut self, own_addr_type: OwnAddrType)

Set the own address type.

source

pub fn set_own_addr_type_to_non_resolvable_random(&mut self)

Set the own address type to non-resolvable random address.

source

pub fn set_rnd_addr(&mut self, addr: [u8; 6]) -> Result<(), BLEError>

Set the own address to be used when the address type is random.

source

pub fn set_device_name(device_name: &str) -> Result<(), BLEError>

Auto Trait Implementations§

§

impl RefUnwindSafe for BLEDevice

§

impl Send for BLEDevice

§

impl Sync for BLEDevice

§

impl Unpin for BLEDevice

§

impl UnwindSafe for BLEDevice

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.