pub struct BufferedReceiver<'d, D: Driver<'d>> { /* private fields */ }Expand description
Vendor class buffered receiver for stream-like reads.
Implements embedded_io_async::Read allowing arbitrarily sized chunks of data to be read.
Implementations§
Source§impl<'d, D: Driver<'d>> BufferedReceiver<'d, D>
impl<'d, D: Driver<'d>> BufferedReceiver<'d, D>
Sourcepub fn max_packet_size(&self) -> u16
pub fn max_packet_size(&self) -> u16
Gets the maximum packet size in bytes.
Sourcepub async fn wait_connection(&mut self)
pub async fn wait_connection(&mut self)
Waits for the USB host to enable this endpoint.
Trait Implementations§
Source§impl<'d, D: Driver<'d>> ErrorType for BufferedReceiver<'d, D>
Available on crate feature embedded-io only.
impl<'d, D: Driver<'d>> ErrorType for BufferedReceiver<'d, D>
Available on crate feature
embedded-io only.Source§type Error = VendorError
type Error = VendorError
Error type of all the IO operations on this type.
Source§impl<'d, D: Driver<'d>> Read for BufferedReceiver<'d, D>
Available on crate feature embedded-io only.
impl<'d, D: Driver<'d>> Read for BufferedReceiver<'d, D>
Available on crate feature
embedded-io only.Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async 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§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 moreAuto Trait Implementations§
impl<'d, D> !UnwindSafe for BufferedReceiver<'d, D>
impl<'d, D> Forget for BufferedReceiver<'d, D>
impl<'d, D> Freeze for BufferedReceiver<'d, D>
impl<'d, D> Move for BufferedReceiver<'d, D>
impl<'d, D> RefUnwindSafe for BufferedReceiver<'d, D>where
Receiver<'d, D>: RefUnwindSafe,
impl<'d, D> Send for BufferedReceiver<'d, D>
impl<'d, D> Sync for BufferedReceiver<'d, D>
impl<'d, D> Unpin for BufferedReceiver<'d, D>
impl<'d, D> UnsafeUnpin for BufferedReceiver<'d, D>where
Receiver<'d, D>: UnsafeUnpin,
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