pub struct MockBleStream { /* private fields */ }Expand description
Mock BLE stream backed by tokio channels.
Implementations§
Trait Implementations§
Source§impl BleStream for MockBleStream
impl BleStream for MockBleStream
Source§async fn send(&self, data: &[u8]) -> Result<(), TransportError>
async fn send(&self, data: &[u8]) -> Result<(), TransportError>
Send data over the L2CAP connection.
Source§async fn recv(&self, buf: &mut [u8]) -> Result<usize, TransportError>
async fn recv(&self, buf: &mut [u8]) -> Result<usize, TransportError>
Receive data from the L2CAP connection. Read more
Source§fn remote_addr(&self) -> &BleAddr
fn remote_addr(&self) -> &BleAddr
Get the remote device address.
Auto Trait Implementations§
impl !Freeze for MockBleStream
impl !RefUnwindSafe for MockBleStream
impl Send for MockBleStream
impl Sync for MockBleStream
impl Unpin for MockBleStream
impl UnsafeUnpin for MockBleStream
impl UnwindSafe for MockBleStream
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more