Function serve
pub fn serve<H>(
host: &H,
caller: &Caller,
message: RemoteActionMessage,
) -> Option<Pending<RemoteActionMessage>>Expand description
Answer one request from caller against host.
Returns None for a message that is not a request (a response arriving
at a host is dropped, never answered). A refused invocation becomes a
ReceiptStatus::Rejected receipt so the caller always learns the fate
of the id it chose; an answer the host abandons becomes a refusal too.
A request that asks to wait (wait_ms on RemoteActionMessage::Observe
or InvokeRequest) is answered once the invocation moves, through
ActionHost::next_change and without holding a thread; see
settle_with. A host that cannot signal changes answers at once.