Skip to main content

ReadAborted

Trait ReadAborted 

Source
pub trait ReadAborted: Send {
    type Error: Error + Send + Sync + 'static;

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

Wait for the read stream to abort.

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

Required Associated Types§

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<ErrorCode, Self::Error>> + Send

Wait for a stream’s corresponding write side to abort.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§