Skip to main content

ServerCallback

Trait ServerCallback 

Source
pub trait ServerCallback {
    // Required method
    fn on_new_objects<'life0, 'async_trait>(
        &'life0 self,
        asdu: Asdu,
        id: ConnectionId,
        address: SocketAddr,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn on_new_connection<'life0, 'async_trait>(
        &'life0 self,
        address: SocketAddr,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn on_connection_started<'life0, 'async_trait>(
        &'life0 self,
        id: ConnectionId,
        address: SocketAddr,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn on_connection_stopped<'life0, 'async_trait>(
        &'life0 self,
        id: ConnectionId,
        address: SocketAddr,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn on_error<'life0, 'life1, 'async_trait>(
        &'life0 self,
        error: &'life1 Error,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn on_new_objects<'life0, 'async_trait>( &'life0 self, asdu: Asdu, id: ConnectionId, address: SocketAddr, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn on_new_connection<'life0, 'async_trait>( &'life0 self, address: SocketAddr, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn on_connection_started<'life0, 'async_trait>( &'life0 self, id: ConnectionId, address: SocketAddr, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn on_connection_stopped<'life0, 'async_trait>( &'life0 self, id: ConnectionId, address: SocketAddr, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn on_error<'life0, 'life1, 'async_trait>( &'life0 self, error: &'life1 Error, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§