pub trait BulkIn: Send {
// Required methods
fn submit(&mut self, len: usize);
fn pending(&self) -> usize;
fn wait_next(&mut self, timeout: Duration) -> Option<Completion>;
fn cancel_all(&mut self);
fn reset(&mut self) -> Result<(), U3vError>;
// Provided method
fn is_present(&self) -> Option<bool> { ... }
}Expand description
A bulk IN endpoint’s queue of transfers: submitted in order, completed in order (USB bulk transfers on one endpoint complete in the order they were queued).
Required Methods§
Sourcefn submit(&mut self, len: usize)
fn submit(&mut self, len: usize)
Queue a read of len bytes. It completes when len bytes have
arrived, or earlier at a short packet.
Sourcefn wait_next(&mut self, timeout: Duration) -> Option<Completion>
fn wait_next(&mut self, timeout: Duration) -> Option<Completion>
The oldest queued transfer once it completes, waiting up to
timeout; None if none completed in time — it stays queued — or if
nothing is queued.
Sourcefn cancel_all(&mut self)
fn cancel_all(&mut self)
Ask every queued transfer to end. Each still comes back from
wait_next, with whatever bytes arrived before it
ended and a U3vError::Cancelled status unless it completed first.
Sourcefn reset(&mut self) -> Result<(), U3vError>
fn reset(&mut self) -> Result<(), U3vError>
Reset the endpoint, with nothing queued: halt it and clear the halt,
so the device drops whatever it had queued on it and both sides
restart the endpoint’s data toggle. A stream does this before it is
enabled, as aravis does (arv_uv_device_reset_stream_endpoint), and
to recover from a stall.
Provided Methods§
Sourcefn is_present(&self) -> Option<bool>
fn is_present(&self) -> Option<bool>
UsbTransfer::is_present for the device this endpoint is on.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".