[][src]Trait potatonet_common::Context

pub trait Context {
    fn call<'life0, 'life1, 'async_trait, T, R>(
        &'life0 self,
        service_name: &'life1 str,
        request: Request<T>
    ) -> Pin<Box<dyn Future<Output = Result<Response<R>>> + Send + 'async_trait>>
    where
        T: Serialize + Send + Sync,
        R: DeserializeOwned + Send + Sync,
        T: 'async_trait,
        R: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn notify<'life0, 'life1, 'async_trait, T: Serialize + Send + Sync>(
        &'life0 self,
        service_name: &'life1 str,
        request: Request<T>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

上下文

Required methods

fn call<'life0, 'life1, 'async_trait, T, R>(
    &'life0 self,
    service_name: &'life1 str,
    request: Request<T>
) -> Pin<Box<dyn Future<Output = Result<Response<R>>> + Send + 'async_trait>> where
    T: Serialize + Send + Sync,
    R: DeserializeOwned + Send + Sync,
    T: 'async_trait,
    R: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

调用服务

fn notify<'life0, 'life1, 'async_trait, T: Serialize + Send + Sync>(
    &'life0 self,
    service_name: &'life1 str,
    request: Request<T>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

发送通知

Loading content...

Implementors

Loading content...