pub struct BleConnector<'d> { /* private fields */ }
Expand description
A blocking HCI connector
Implementations§
Source§impl<'d> BleConnector<'d>
impl<'d> BleConnector<'d>
pub fn new(_init: &'d EspWifiController<'d>, device: BT<'d>) -> BleConnector<'d>
pub fn next(&mut self, buf: &mut [u8]) -> Result<usize, BleConnectorError>
Trait Implementations§
Source§impl Drop for BleConnector<'_>
impl Drop for BleConnector<'_>
Source§impl ErrorType for BleConnector<'_>
impl ErrorType for BleConnector<'_>
Source§type Error = BleConnectorError
type Error = BleConnectorError
Error type of all the IO operations on this type.
Source§impl Read for BleConnector<'_>
impl Read for BleConnector<'_>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl Read for BleConnector<'_>
impl Read for BleConnector<'_>
Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, BleConnectorError>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, BleConnectorError>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§async fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl Transport for BleConnector<'_>
impl Transport for BleConnector<'_>
Source§async fn read<'a>(
&self,
rx: &'a mut [u8],
) -> Result<ControllerToHostPacket<'a>, Self::Error>
async fn read<'a>( &self, rx: &'a mut [u8], ) -> Result<ControllerToHostPacket<'a>, Self::Error>
Read a complete HCI packet into the rx buffer
Source§async fn write<T: HostToControllerPacket>(
&self,
val: &T,
) -> Result<(), Self::Error>
async fn write<T: HostToControllerPacket>( &self, val: &T, ) -> Result<(), Self::Error>
Write a complete HCI packet from the tx buffer
Source§impl Write for BleConnector<'_>
impl Write for BleConnector<'_>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Source§impl Write for BleConnector<'_>
impl Write for BleConnector<'_>
Source§async fn write(&mut self, buf: &[u8]) -> Result<usize, BleConnectorError>
async fn write(&mut self, buf: &[u8]) -> Result<usize, BleConnectorError>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§async fn flush(&mut self) -> Result<(), BleConnectorError>
async fn flush(&mut self) -> Result<(), BleConnectorError>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination.