Trait Caller
pub trait Caller: Send + Sync {
type Error: Debug;
// Required methods
fn on_return<'life0, 'life1, 'async_trait>(
&'life0 self,
header: CallHeader,
from: NodeID,
context: &'life1 MulticastContext<Self::Error>,
returned: Result<RemoteObj, Error<Self::Error>>,
) -> Pin<Box<dyn Future<Output = Result<Option<RemoteObj>, Error<Self::Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_callee<'life0, 'async_trait>(
&'life0 self,
header: CallHeader,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeID>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Associated Types§
Required Methods§
fn on_return<'life0, 'life1, 'async_trait>(
&'life0 self,
header: CallHeader,
from: NodeID,
context: &'life1 MulticastContext<Self::Error>,
returned: Result<RemoteObj, Error<Self::Error>>,
) -> Pin<Box<dyn Future<Output = Result<Option<RemoteObj>, Error<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_return<'life0, 'life1, 'async_trait>(
&'life0 self,
header: CallHeader,
from: NodeID,
context: &'life1 MulticastContext<Self::Error>,
returned: Result<RemoteObj, Error<Self::Error>>,
) -> Pin<Box<dyn Future<Output = Result<Option<RemoteObj>, Error<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Callback triggered upon receiving the result from one of the required nodes for a given
call. Returns Ok(None) if the caller still needs further results from the remaining nodes
in order to work out the final result. This is helpful in the case where a multicast of UPC
is required (and Self::get_callee needs to return a chosen quorum of the hosts).
fn get_callee<'life0, 'async_trait>(
&'life0 self,
header: CallHeader,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeID>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_callee<'life0, 'async_trait>(
&'life0 self,
header: CallHeader,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeID>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the set of required nodes to finish this UPC.