pub trait ResolveSink<Op>where
Op: Operation,{
// Required method
fn resolve_request(
&self,
request: &mut Request<Op>,
output: Op::Output,
) -> Result<(), ResolveError>;
}Expand description
Lets a core-local handler resolve a Request back through the router.
Core-side handlers (for example background workers that do async I/O) hold a
Weak reference to something implementing this trait, typically the
EffectRouter itself. When a handler finishes its work, it calls
ResolveSink::resolve_request to resolve the original request and advance
the runtime, so any follow-up effects are routed using the same policy.
The trait is generic over the Operation Op so a handler only depends on
the single operation type it knows how to service, rather than the whole
route set.