Skip to main content

Service

Trait Service 

Source
pub trait Service: Send + Sync {
    // Required methods
    fn service_id(&self) -> u8;
    fn handle_invocation<'life0, 'life1, 'async_trait>(
        &'life0 self,
        method_id: u8,
        sequence: u32,
        codec: &'life1 mut dyn Codec,
    ) -> Pin<Box<dyn Future<Output = ErpcResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn supported_methods(&self) -> Vec<u8> ;
}
Expand description

Service trait for handling method calls

Required Methods§

Source

fn service_id(&self) -> u8

Get service ID

Source

fn handle_invocation<'life0, 'life1, 'async_trait>( &'life0 self, method_id: u8, sequence: u32, codec: &'life1 mut dyn Codec, ) -> Pin<Box<dyn Future<Output = ErpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle method invocation

Source

fn supported_methods(&self) -> Vec<u8>

Get list of supported method IDs

Implementors§