pub trait CallExt:
Future
+ Send
+ Sized {
// Provided methods
fn within<'a>(
self,
slot: &'a CallSlot,
op: &'static str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, FaucetError>> + Send + 'a>>
where Self: 'a,
Self::Output: Send { ... }
fn within_ctx<'a>(
self,
ctx: &'a CallContext,
op: &'static str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, FaucetError>> + Send + 'a>>
where Self: 'a,
Self::Output: Send { ... }
}Expand description
Run any future as a one-shot backend call: client.send().within(&slot, "put").await? is CallSlot::call_once for a future whose output is not
a FaucetError result (an SDK response), handing that output back
untouched. The outer Result is the call context running out — the
deadline or the cancel token.
Provided Methods§
Sourcefn within<'a>(
self,
slot: &'a CallSlot,
op: &'static str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, FaucetError>> + Send + 'a>>
fn within<'a>( self, slot: &'a CallSlot, op: &'static str, ) -> Pin<Box<dyn Future<Output = Result<Self::Output, FaucetError>> + Send + 'a>>
self as the call op through slot’s effective context.
Sourcefn within_ctx<'a>(
self,
ctx: &'a CallContext,
op: &'static str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, FaucetError>> + Send + 'a>>
fn within_ctx<'a>( self, ctx: &'a CallContext, op: &'static str, ) -> Pin<Box<dyn Future<Output = Result<Self::Output, FaucetError>> + Send + 'a>>
within through a CallContext.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".