Skip to main content

InvokeExt

Trait InvokeExt 

Source
pub trait InvokeExt: Invoke {
    // Provided methods
    fn invoke_values<P, Params, Results, Paths>(
        &self,
        cx: Self::Context,
        instance: &str,
        func: &str,
        params: Params,
        paths: Paths,
    ) -> impl Future<Output = Result<(Results, Option<impl Future<Output = Result<()>> + Send + 'static + use<Self, P, Params, Results, Paths>>)>> + Send
       where Paths: AsRef<[P]> + Send,
             P: AsRef<[Option<usize>]> + Send + Sync,
             Params: TupleEncode + Send,
             Results: TupleDecode + Send,
             <Params::Encoder as Encoder<Params>>::Error: Error + Send + Sync + 'static,
             <Results::Decoder as Decoder>::Error: Error + Send + Sync + 'static { ... }
    fn invoke_values_blocking<P, Params, Results>(
        &self,
        cx: Self::Context,
        instance: &str,
        func: &str,
        params: Params,
        paths: impl AsRef<[P]> + Send,
    ) -> impl Future<Output = Result<Results>> + Send
       where P: AsRef<[Option<usize>]> + Send + Sync,
             Params: TupleEncode + Send,
             Results: TupleDecode + Send,
             <Params::Encoder as Encoder<Params>>::Error: Error + Send + Sync + 'static,
             <Results::Decoder as Decoder>::Error: Error + Send + Sync + 'static { ... }
    fn timeout(&self, timeout: Duration) -> Timeout<'_, Self> { ... }
    fn timeout_owned(self, timeout: Duration) -> TimeoutOwned<Self>
       where Self: Sized { ... }
}
Expand description

Extension trait for Invoke

Provided Methods§

Source

fn invoke_values<P, Params, Results, Paths>( &self, cx: Self::Context, instance: &str, func: &str, params: Params, paths: Paths, ) -> impl Future<Output = Result<(Results, Option<impl Future<Output = Result<()>> + Send + 'static + use<Self, P, Params, Results, Paths>>)>> + Send
where Paths: AsRef<[P]> + Send, P: AsRef<[Option<usize>]> + Send + Sync, Params: TupleEncode + Send, Results: TupleDecode + Send, <Params::Encoder as Encoder<Params>>::Error: Error + Send + Sync + 'static, <Results::Decoder as Decoder>::Error: Error + Send + Sync + 'static,

Invoke function func on instance instance using typed Params and Results

Source

fn invoke_values_blocking<P, Params, Results>( &self, cx: Self::Context, instance: &str, func: &str, params: Params, paths: impl AsRef<[P]> + Send, ) -> impl Future<Output = Result<Results>> + Send
where P: AsRef<[Option<usize>]> + Send + Sync, Params: TupleEncode + Send, Results: TupleDecode + Send, <Params::Encoder as Encoder<Params>>::Error: Error + Send + Sync + 'static, <Results::Decoder as Decoder>::Error: Error + Send + Sync + 'static,

Invoke function func on instance instance using typed Params and Results This is like Self::invoke_values, but it only results once all I/O is done

Source

fn timeout(&self, timeout: Duration) -> Timeout<'_, Self>

Returns a Timeout, wrapping Self with an implementation of Invoke, which will error, if call to Invoke::invoke does not return within a supplied timeout

Source

fn timeout_owned(self, timeout: Duration) -> TimeoutOwned<Self>
where Self: Sized,

This is like InvokeExt::timeout, but moves Self and returns corresponding TimeoutOwned

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T: Invoke> InvokeExt for T