pub trait EndpointIn: Endpoint {
// Required method
async fn write(&mut self, buf: &[u8]) -> Result<(), EndpointError>;
// Provided method
async fn write_transfer(
&mut self,
buf: &[u8],
needs_zlp: bool,
) -> Result<(), EndpointError> { ... }
}
Expand description
IN Endpoint trait.
Required Methods§
Provided Methods§
Sourceasync fn write_transfer(
&mut self,
buf: &[u8],
needs_zlp: bool,
) -> Result<(), EndpointError>
async fn write_transfer( &mut self, buf: &[u8], needs_zlp: bool, ) -> Result<(), EndpointError>
Write all the data from buf to the endpoint one wMaxPacketSize chunk at a time.
If the buffer size is evenly divisible by wMaxPacketSize, this will also ensure the terminating zero-length-packet is transmitted.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.