pub struct Stack<'stack, C, P: PacketPool> { /* private fields */ }Expand description
Contains the host stack
Implementations§
Source§impl<'stack, C: Controller, P: PacketPool> Stack<'stack, C, P>
 
impl<'stack, C: Controller, P: PacketPool> Stack<'stack, C, P>
Sourcepub fn set_random_address(self, address: Address) -> Self
 
pub fn set_random_address(self, address: Address) -> Self
Set the random address used by this host.
Sourcepub fn set_random_generator_seed<RNG: RngCore + CryptoRng>(
    self,
    _random_generator: &mut RNG,
) -> Self
 
pub fn set_random_generator_seed<RNG: RngCore + CryptoRng>( self, _random_generator: &mut RNG, ) -> Self
Set the random generator seed for random generator used by security manager
Sourcepub async fn command<T>(
    &self,
    cmd: T,
) -> Result<T::Return, BleHostError<C::Error>>where
    T: SyncCmd,
    C: ControllerCmdSync<T>,
 
pub async fn command<T>(
    &self,
    cmd: T,
) -> Result<T::Return, BleHostError<C::Error>>where
    T: SyncCmd,
    C: ControllerCmdSync<T>,
Run a HCI command and return the response.
Sourcepub async fn async_command<T>(
    &self,
    cmd: T,
) -> Result<(), BleHostError<C::Error>>where
    T: AsyncCmd,
    C: ControllerCmdAsync<T>,
 
pub async fn async_command<T>(
    &self,
    cmd: T,
) -> Result<(), BleHostError<C::Error>>where
    T: AsyncCmd,
    C: ControllerCmdAsync<T>,
Run an async HCI command where the response will generate an event later.
Sourcepub fn metrics<F: FnOnce(&HostMetrics) -> R, R>(&self, f: F) -> R
 
pub fn metrics<F: FnOnce(&HostMetrics) -> R, R>(&self, f: F) -> R
Read current host metrics
Sourcepub fn log_status(&self, verbose: bool)
 
pub fn log_status(&self, verbose: bool)
Log status information of the host
Auto Trait Implementations§
impl<'stack, C, P> !Freeze for Stack<'stack, C, P>
impl<'stack, C, P> !RefUnwindSafe for Stack<'stack, C, P>
impl<'stack, C, P> Send for Stack<'stack, C, P>
impl<'stack, C, P> !Sync for Stack<'stack, C, P>
impl<'stack, C, P> Unpin for Stack<'stack, C, P>
impl<'stack, C, P> !UnwindSafe for Stack<'stack, C, P>
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
Mutably borrows from an owned value. Read more