Trait WriteAborted

Source
pub trait WriteAborted: Send {
    type ErrorCode: TryInto<u32> + Send + Sync;
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn aborted(
        self,
    ) -> impl Future<Output = Result<Self::ErrorCode, Self::Error>> + Send;
}
Expand description

Wait for the write stream to abort.

This can happen when the “read” part aborts the stream.

Required Associated Types§

Source

type ErrorCode: TryInto<u32> + Send + Sync

An error code the stream is aborted with.

Source

type Error: Error + Send + Sync + 'static

An error that can occur while waiting for a stream to be aborted.

Required Methods§

Source

fn aborted( self, ) -> impl Future<Output = Result<Self::ErrorCode, Self::Error>> + Send

Wait for a stream to abort.

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.

Implementors§