pub trait IsoEndpointIn: Endpoint {
type Slot<'a>: IsoInSlot
where Self: 'a;
// Required methods
fn queue_depth(&self) -> u8;
async fn ready(&mut self) -> Result<Self::Slot<'_>, EndpointDisabledError>;
}Expand description
Isochronous IN endpoint trait.
Drivers implement this only when they can schedule packets by service interval and drop uncollected packets instead of sending them late.
Required Associated Types§
Required Methods§
Sourcefn queue_depth(&self) -> u8
fn queue_depth(&self) -> u8
How many packets may be committed ahead of the one the host collects next.
1: one packet can be committed.readywaits until the previous packet has been sent or dropped before offering another slot.n:readymay offer a slot whilenpackets are still queued.
This is what the driver actually provides. EndpointConfig::buffers
is only a hint.
Sourceasync fn ready(&mut self) -> Result<Self::Slot<'_>, EndpointDisabledError>
async fn ready(&mut self) -> Result<Self::Slot<'_>, EndpointDisabledError>
Wait until the next packet can be queued, returning a reserved slot for its service interval.
While the writer keeps up, each call yields the next service interval. The first call, and
any call after the writer fell behind, yields the next interval that can still be armed,
reporting any gap via IsoInSlot::skipped.
§Cancel safety
Dropping the returned future or dropping the returned slot before calling
IsoInSlot::write leaves nothing armed, and the endpoint remains usable for future
calls.
§Errors
EndpointDisabledError- The endpoint is disabled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".