Close

Trait Close 

Source
pub trait Close: Send {
    // Required method
    fn close(self) -> impl Future<Output = ()> + Send;
}
Expand description

Abstractly represents an entity that can be closed.

Close is typically a safer, conditional version of Drain. In evno, Bus::close() only performs a full drain if it is the last reference.

Note: This method consumes self.

Required Methods§

Source

fn close(self) -> impl Future<Output = ()> + Send

Asynchronously performs the close operation.

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§

Source§

impl Close for Bus

Source§

impl<T: Close, U: Send> Close for Chain<T, U>