Struct BroadcastAssistant

Source
pub struct BroadcastAssistant<T: GattTypes> { /* private fields */ }

Implementations§

Source§

impl<T: GattTypes + 'static> BroadcastAssistant<T>

Source

pub fn new(central: T::Central) -> Self

Source

pub fn start(&mut self) -> Result<EventStream<T>, Error>

Start broadcast assistant. Returns EventStream that the upper layer can poll. Upper layer can call methods on BroadcastAssistant based on the events it sees.

Source

pub fn scan_for_scan_delegators(&mut self) -> Result<T::ScanResultStream, Error>

Source

pub async fn connect_to_scan_delegator( &self, peer_id: PeerId, ) -> Result<Peer<T>, Error>
where <T as GattTypes>::NotificationStream: Send,

Source

pub fn force_discover_broadcast_source( &self, peer_id: PeerId, address: [u8; 6], address_type: AddressType, advertising_sid: AdvertisingSetId, ) -> Result<BroadcastSource, Error>

Source

pub fn force_discover_broadcast_source_metadata( &self, peer_id: PeerId, big_metadata: Vec<Vec<Metadata>>, ) -> Result<BroadcastSource, Error>

Source

pub fn known_broadcast_sources(&self) -> HashMap<PeerId, BroadcastSource>

Auto Trait Implementations§

§

impl<T> Freeze for BroadcastAssistant<T>
where <T as GattTypes>::Central: Freeze,

§

impl<T> !RefUnwindSafe for BroadcastAssistant<T>

§

impl<T> Send for BroadcastAssistant<T>
where <T as GattTypes>::Central: Send,

§

impl<T> Sync for BroadcastAssistant<T>
where <T as GattTypes>::Central: Sync,

§

impl<T> Unpin for BroadcastAssistant<T>
where <T as GattTypes>::Central: Unpin,

§

impl<T> !UnwindSafe for BroadcastAssistant<T>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.