pub trait ReadAbort: Send {
type ErrorCode: From<u32> + Send + Sync + 'static;
type Error: Error + Send + Sync + 'static;
// Required method
fn abort(
self,
error_code: Self::ErrorCode,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
Expand description
Abort the read stream.
Sends a signal to the peer that the read side of the stream has been aborted. Discards the receive buffer; the peer is typically expected to abort the corresponding send side in response.
An unsigned 8-bit error code can be supplied as a part of the signal to the peer.
Required Associated Types§
Required Methods§
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.