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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".