Skip to main content

AnyServer

Trait AnyServer 

Source
pub trait AnyServer: Send + Sync {
    // Required methods
    fn protocol_version(&self) -> &'static str;
    fn rpc<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: Context,
        data: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn protocol_version(&self) -> &'static str

Source

fn rpc<'life0, 'life1, 'async_trait>( &'life0 mut self, context: Context, data: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<P: Server> AnyServer for P