pub trait Sends<T: Message> {
// Required method
fn send(
&self,
msg: T,
) -> impl Future<Output = Result<Output<T>, SendError<T>>> + Send + '_;
// Provided method
fn send_blocking(&self, msg: T) -> Result<Output<T>, SendError<T>> { ... }
}Expand description
Implemented for inboxes that can send messages of type T.
Required Methods§
Provided Methods§
Sourcefn send_blocking(&self, msg: T) -> Result<Output<T>, SendError<T>>
fn send_blocking(&self, msg: T) -> Result<Output<T>, SendError<T>>
Same as Sends::send, but blocks the current thread until the message is sent.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".