Skip to main content

ClientMessageTransport

Trait ClientMessageTransport 

Source
pub trait ClientMessageTransport: MaybeSend + 'static {
    // Required methods
    fn send(
        &mut self,
        command: ClientCommand,
    ) -> impl Future<Output = Result<(), ClientError>> + MaybeSend;
    fn recv(
        &mut self,
    ) -> impl Future<Output = Result<ServerMessage, ClientError>> + MaybeSend;
    fn close(&mut self) -> impl Future<Output = ()> + MaybeSend;
}

Required Methods§

Source

fn send( &mut self, command: ClientCommand, ) -> impl Future<Output = Result<(), ClientError>> + MaybeSend

Source

fn recv( &mut self, ) -> impl Future<Output = Result<ServerMessage, ClientError>> + MaybeSend

Source

fn close(&mut self) -> impl Future<Output = ()> + MaybeSend

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§