Skip to main content

Invoke

Trait Invoke 

Source
pub trait Invoke: Send + Sync {
    type Context: Send + Sync;

    // Required method
    fn invoke<P>(
        &self,
        cx: Self::Context,
        instance: &str,
        func: &str,
        params: Bytes,
        paths: impl AsRef<[P]> + Send,
    ) -> impl Future<Output = Result<(Outgoing, Incoming), Error>> + Send
       where P: AsRef<[Option<usize>]> + Send + Sync;
}
Expand description

Client-side handle to a wRPC transport

Invocations are always multiplexed over the wRPC framing layer, so the outgoing and incoming byte streams are the framed Outgoing and Incoming streams regardless of the underlying transport.

Required Associated Types§

Source

type Context: Send + Sync

Transport-specific invocation context

Required Methods§

Source

fn invoke<P>( &self, cx: Self::Context, instance: &str, func: &str, params: Bytes, paths: impl AsRef<[P]> + Send, ) -> impl Future<Output = Result<(Outgoing, Incoming), Error>> + Send
where P: AsRef<[Option<usize>]> + Send + Sync,

Invoke function func on instance instance

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Invoke for &Client

Source§

type Context = ()

Source§

async fn invoke<P>( &self, __arg1: <&Client as Invoke>::Context, instance: &str, func: &str, params: Bytes, paths: impl AsRef<[P]> + Send, ) -> Result<(Outgoing, Incoming), Error>
where P: AsRef<[Option<usize>]> + Send + Sync,

Source§

impl Invoke for &Client

Source§

type Context = ()

Source§

async fn invoke<P>( &self, __arg1: <&Client as Invoke>::Context, instance: &str, func: &str, params: Bytes, paths: impl AsRef<[P]> + Send, ) -> Result<(Outgoing, Incoming), Error>
where P: AsRef<[Option<usize>]> + Send + Sync,

Source§

impl Invoke for Client

Source§

type Context = ()

Source§

async fn invoke<P>( &self, __arg1: <Client as Invoke>::Context, instance: &str, func: &str, params: Bytes, paths: impl AsRef<[P]> + Send, ) -> Result<(Outgoing, Incoming), Error>
where P: AsRef<[Option<usize>]> + Send + Sync,

Source§

impl Invoke for Client

Source§

type Context = ()

Source§

async fn invoke<P>( &self, __arg1: <Client as Invoke>::Context, instance: &str, func: &str, params: Bytes, paths: impl AsRef<[P]> + Send, ) -> Result<(Outgoing, Incoming), Error>
where P: AsRef<[Option<usize>]> + Send + Sync,

Source§

impl<R> Invoke for Client<'_, R>
where R: Resolver + Send + Sync,

Source§

type Context = ()

Source§

async fn invoke<P>( &self, __arg1: <Client<'_, R> as Invoke>::Context, instance: &str, func: &str, params: Bytes, paths: impl AsRef<[P]> + Send, ) -> Result<(Outgoing, Incoming), Error>
where P: AsRef<[Option<usize>]> + Send + Sync,

Implementors§

Source§

impl Invoke for wrpc::transport::frame::unix::Client<&Path>

Source§

impl Invoke for wrpc::transport::frame::unix::Client<&SocketAddr>

Source§

impl Invoke for wrpc::transport::frame::unix::Client<PathBuf>

Source§

impl Invoke for wrpc::transport::frame::unix::Client<SocketAddr>

Source§

impl Invoke for Invocation

Source§

impl<I, O> Invoke for &Oneshot<I, O>
where I: AsyncRead + Send + Unpin + 'static, O: AsyncWrite + Send + Unpin + 'static,

Source§

impl<I, O> Invoke for Oneshot<I, O>
where I: AsyncRead + Send + Unpin + 'static, O: AsyncWrite + Send + Unpin + 'static,

Source§

impl<T> Invoke for wrpc::transport::frame::tcp::Client<T>
where T: ToSocketAddrs + Clone + Send + Sync,

Source§

impl<T> Invoke for Timeout<'_, T>
where T: Invoke,

Source§

impl<T> Invoke for TimeoutOwned<T>
where T: Invoke,