pub trait Client: Send {
// Required methods
fn write<M: DeBolt + Encodable>(&mut self, msg: M) -> Result<()>;
fn write_vec(&mut self, v: Vec<u8>) -> Result<()>;
fn read(&mut self) -> Result<Message>;
fn read_raw(&mut self) -> Result<Vec<u8>>;
fn id(&self) -> u64;
fn new_client(&mut self) -> Self;
}
Required Methods§
fn write<M: DeBolt + Encodable>(&mut self, msg: M) -> Result<()>
fn write_vec(&mut self, v: Vec<u8>) -> Result<()>
fn read(&mut self) -> Result<Message>
fn read_raw(&mut self) -> Result<Vec<u8>>
fn id(&self) -> u64
fn new_client(&mut self) -> Self
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.