Trait ya_service_bus::RpcEndpoint

source ·
pub trait RpcEndpoint<T: RpcMessage>: Clone {
    type Result: Future<Output = Result<<RpcEnvelope<T> as Message>::Result, Error>>;

    // Required methods
    fn send(&self, msg: T) -> Self::Result;
    fn send_as(&self, caller: impl ToString + 'static, msg: T) -> Self::Result;
}

Required Associated Types§

Required Methods§

source

fn send(&self, msg: T) -> Self::Result

source

fn send_as(&self, caller: impl ToString + 'static, msg: T) -> Self::Result

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> RpcEndpoint<T> for Endpoint
where T: Send + RpcMessage + Unpin,

§

type Result = Pin<Box<dyn Future<Output = Result<Result<<T as RpcMessage>::Item, <T as RpcMessage>::Error>, Error>> + Send>>