pub trait Session {
// Required methods
fn outgoing(&mut self) -> Vec<String>;
fn incoming(&mut self, text: &str);
// Provided method
fn done(&self) -> bool { ... }
}Expand description
One end of a conversation over a socket.
Required Methods§
Sourcefn outgoing(&mut self) -> Vec<String>
fn outgoing(&mut self) -> Vec<String>
What to send now. Asked on every wake and after every message read.
fn incoming(&mut self, text: &str)
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".