pub trait InvokeExt: Invoke {
// Provided methods
fn invoke_values<P, Params, Results>(
&self,
cx: Self::Context,
instance: &str,
func: &str,
params: Params,
paths: impl AsRef<[P]> + Send,
) -> impl Future<Output = Result<(Results, Option<impl Future<Output = Result<()>> + Send + 'static>)>> + Send
where P: AsRef<[Option<usize>]> + Send + Sync,
Params: TupleEncode<Self::Outgoing> + Send,
Results: TupleDecode<Self::Incoming> + 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<Self::Outgoing> + Send,
Results: TupleDecode<Self::Incoming> + 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§
Sourcefn invoke_values<P, Params, Results>(
&self,
cx: Self::Context,
instance: &str,
func: &str,
params: Params,
paths: impl AsRef<[P]> + Send,
) -> impl Future<Output = Result<(Results, Option<impl Future<Output = Result<()>> + Send + 'static>)>> + Send
fn invoke_values<P, Params, Results>( &self, cx: Self::Context, instance: &str, func: &str, params: Params, paths: impl AsRef<[P]> + Send, ) -> impl Future<Output = Result<(Results, Option<impl Future<Output = Result<()>> + Send + 'static>)>> + Send
Invoke function func
on instance instance
using typed Params
and Results
Sourcefn 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
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
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
Sourcefn timeout(&self, timeout: Duration) -> Timeout<'_, Self>
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
Sourcefn timeout_owned(self, timeout: Duration) -> TimeoutOwned<Self>where
Self: Sized,
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", so this trait is not object safe.