pub trait ContextSendMessageExt {
// Required method
fn send_message(
&self,
message: Message,
) -> impl Future<Output = Result<usize, BatchSendError>>;
}Expand description
For sending messages to a context
Required Methods§
Sourcefn send_message(
&self,
message: Message,
) -> impl Future<Output = Result<usize, BatchSendError>>
fn send_message( &self, message: Message, ) -> impl Future<Output = Result<usize, BatchSendError>>
Sends a Message to all connections of the current session
Returns the count of connections the message was sent to, or an error consisting of a list of all errors
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.