pub trait OutboxWriterExt {
// Required methods
fn send_text(&mut self, to: ClientId, text: impl Into<String>);
fn send_command(&mut self, to: ClientId, command: impl Into<Vec<u8>>);
fn send_gmcp(&mut self, to: ClientId, payload: Payload);
}Expand description
Extension trait for EventWriter<Outbox> to make sending messages easier.
Required Methodsยง
fn send_text(&mut self, to: ClientId, text: impl Into<String>)
fn send_command(&mut self, to: ClientId, command: impl Into<Vec<u8>>)
fn send_gmcp(&mut self, to: ClientId, payload: Payload)
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.
Implementations on Foreign Typesยง
Sourceยงimpl OutboxWriterExt for EventWriter<'_, Outbox>
impl OutboxWriterExt for EventWriter<'_, Outbox>
Sourceยงfn send_text(&mut self, to: ClientId, text: impl Into<String>)
fn send_text(&mut self, to: ClientId, text: impl Into<String>)
Sends a Message::Text to a client.
Sourceยงfn send_command(&mut self, to: ClientId, command: impl Into<Vec<u8>>)
fn send_command(&mut self, to: ClientId, command: impl Into<Vec<u8>>)
Sends a Message::Command to a client.