[][src]Trait potatonet::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 + 'static + 'async_trait,
        Self: 'async_trait,
        T: Serialize + Send + 'static + '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: 'static + Send + Serialize + 'async_trait
;
fn notify_to<'life0, 'async_trait, T>(
        &'life0 self,
        to: ServiceId,
        request: Request<T>
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait,
        T: 'static + Send + Serialize + 'async_trait
;
fn publish_with_topic<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        topic: &'life1 str,
        msg: T
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait,
        T: Topic + 'async_trait
; fn publish<'life0, 'async_trait, T>(
        &'life0 self,
        msg: T
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait,
        T: Topic + '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 + 'static + 'async_trait,
    Self: 'async_trait,
    T: Serialize + Send + 'static + '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: 'static + Send + Serialize + 'async_trait, 

发送通知

fn notify_to<'life0, 'async_trait, T>(
    &'life0 self,
    to: ServiceId,
    request: Request<T>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait,
    T: 'static + Send + Serialize + 'async_trait, 

给指定服务发送通知

fn publish_with_topic<'life0, 'life1, 'async_trait, T>(
    &'life0 self,
    topic: &'life1 str,
    msg: T
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait,
    T: Topic + 'async_trait, 

发布消息

Loading content...

Provided methods

fn publish<'life0, 'async_trait, T>(
    &'life0 self,
    msg: T
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait,
    T: Topic + 'async_trait, 

发布消息

Loading content...

Implementors

impl Context for Client[src]

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

Loading content...