FnRemoteBody

Trait FnRemoteBody 

Source
pub trait FnRemoteBody<Args>
where Args: FnRemote,
{ type Fut: Future<Output = Args::Output> + Send; // Required method fn run(&self, args: Args) -> Self::Fut; }
Expand description

An implementation of a remote function.

You shouldn’t need to implement this, as a blanket implementation is provided for any async function or closure that takes a single FnRemote argument and returns the FnRemote::Output.

Required Associated Types§

Source

type Fut: Future<Output = Args::Output> + Send

Required Methods§

Source

fn run(&self, args: Args) -> Self::Fut

Evaluate the function.

Implementors§

Source§

impl<Args, Fut, F> FnRemoteBody<Args> for F
where Args: FnRemote, F: Fn(Args) -> Fut, Fut: Future<Output = Args::Output> + Send,

Source§

type Fut = Fut