pub trait DigitalisServer {
// Required methods
fn handle_message(
&self,
client: &Client,
msg: ClientMessage,
) -> DigitalisResult<Control>;
fn on_open(&self, client: &Client) -> DigitalisResult<()>;
// Provided method
fn accept_connection<'life0, 'async_trait>(
&'life0 self,
client_id: ClientId,
stream: TcpStream,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn handle_message( &self, client: &Client, msg: ClientMessage, ) -> DigitalisResult<Control>
fn on_open(&self, client: &Client) -> DigitalisResult<()>
Provided Methods§
fn accept_connection<'life0, 'async_trait>(
&'life0 self,
client_id: ClientId,
stream: TcpStream,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".