pub struct L2capChannelReader<'d, P: PacketPool> { /* private fields */ }
Expand description
Handle representing an L2CAP channel write endpoint.
Implementations§
Source§impl<'d, P: PacketPool> L2capChannelReader<'d, P>
impl<'d, P: PacketPool> L2capChannelReader<'d, P>
Sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Disconnect this channel.
Sourcepub async fn receive<T: Controller>(
&mut self,
stack: &Stack<'_, T, P>,
buf: &mut [u8],
) -> Result<usize, BleHostError<T::Error>>
pub async fn receive<T: Controller>( &mut self, stack: &Stack<'_, T, P>, buf: &mut [u8], ) -> Result<usize, BleHostError<T::Error>>
Receive data on this channel and copy it into the buffer.
The length provided buffer slice must be equal or greater to the agreed MTU.
Sourcepub async fn receive_sdu<T: Controller>(
&mut self,
stack: &Stack<'_, T, P>,
) -> Result<Sdu<P::Packet>, BleHostError<T::Error>>
pub async fn receive_sdu<T: Controller>( &mut self, stack: &Stack<'_, T, P>, ) -> Result<Sdu<P::Packet>, BleHostError<T::Error>>
Receive the next SDU available on this channel.
The length provided buffer slice must be equal or greater to the agreed MTU.
Sourcepub fn channel_ref(&mut self) -> L2capChannelRef<'d, P>
pub fn channel_ref(&mut self) -> L2capChannelRef<'d, P>
Create a channel reference for the l2cap channel.
Trait Implementations§
Source§impl<P: PacketPool> Drop for L2capChannelReader<'_, P>
impl<P: PacketPool> Drop for L2capChannelReader<'_, P>
Auto Trait Implementations§
impl<'d, P> Freeze for L2capChannelReader<'d, P>
impl<'d, P> !RefUnwindSafe for L2capChannelReader<'d, P>
impl<'d, P> !Send for L2capChannelReader<'d, P>
impl<'d, P> !Sync for L2capChannelReader<'d, P>
impl<'d, P> Unpin for L2capChannelReader<'d, P>
impl<'d, P> !UnwindSafe for L2capChannelReader<'d, 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