pub trait WriteAbort: Send {
type ErrorCode: From<u32> + Send + Sync;
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 write stream.
Sends a signal to the peer that the write side of the stream has been aborted. Discards the send buffer; if possible, no currently outstanding data is transmitted or retransmitted.
An unsigned 8-bit error code can be supplied as a part of the signal to the peer; if omitted, the error code is presumed to be 0.
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.