pub trait Channel:
AsyncRead
+ AsyncWrite
+ Send
+ Unpin
+ Debug
+ 'static {
// Required methods
fn id(&self) -> u16;
fn label(&self) -> &String;
fn is_closed(&self) -> bool;
fn on_close(&self) -> Receiver<bool>;
fn buffer_size(&self) -> u32;
// Provided method
fn debug(&self, channel_type: &str, f: &mut Formatter<'_>) -> Result { ... }
}Required Methods§
fn id(&self) -> u16
fn label(&self) -> &String
fn is_closed(&self) -> bool
fn on_close(&self) -> Receiver<bool>
fn buffer_size(&self) -> u32
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".