[][src]Trait potatonet::node::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>, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        R: DeserializeOwned + Send + Sync + 'async_trait,
        Self: 'async_trait,
        T: Serialize + Send + Sync + 'async_trait
;
fn notify<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        service_name: &'life1 str,
        request: Request<T>
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait,
        T: Send + Sync + Serialize + '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>, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    R: DeserializeOwned + Send + Sync + 'async_trait,
    Self: 'async_trait,
    T: Serialize + Send + Sync + 'async_trait, 

调用服务

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

发送通知

Loading content...

Implementors

impl Context for Client[src]

impl<'a> Context for NodeContext<'a>[src]

Loading content...