pub struct Stack<'stack, C> { /* private fields */ }
Expand description
Contains the host stack
Implementations§
Source§impl<'stack, C: Controller> Stack<'stack, C>
impl<'stack, C: Controller> Stack<'stack, C>
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(&self) -> HostMetrics
pub fn metrics(&self) -> HostMetrics
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> !Freeze for Stack<'stack, C>
impl<'stack, C> !RefUnwindSafe for Stack<'stack, C>
impl<'stack, C> !Send for Stack<'stack, C>
impl<'stack, C> !Sync for Stack<'stack, C>
impl<'stack, C> Unpin for Stack<'stack, C>where
C: Unpin,
impl<'stack, C> !UnwindSafe for Stack<'stack, C>
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