Trait Channel

Source
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§

Source

fn id(&self) -> u16

Source

fn label(&self) -> &String

Source

fn is_closed(&self) -> bool

Source

fn on_close(&self) -> Receiver<bool>

Source

fn buffer_size(&self) -> u32

Provided Methods§

Source

fn debug(&self, channel_type: &str, f: &mut Formatter<'_>) -> Result

Implementors§

Source§

impl<TAsyncDuplex: AsyncRead + AsyncWrite + Send + Unpin + 'static> Channel for ChannelMock<TAsyncDuplex>

Source§

impl<TAsyncDuplex: AsyncRead + AsyncWrite + Send + Unpin + ?Sized + 'static> Channel for TransportChannel<TAsyncDuplex>