pub struct HandlerHandle { /* private fields */ }Expand description
The Handler port role.
A handler that has served nothing is presented every call waiting in the
store; once it has served anything, it is presented only the members it
served, and another handler’s calls stay waiting for that handler. A claim
belongs to the handler it was presented to, so another handler’s settle
of it answers SettleError::UnknownClaim.
The empty set meaning no filter is a deliberate deviation from
Handler::serve, which says delivery starts at the members listed. The
generated dispatch never calls serve
(crates/ridl-backend-rust/src/face.rs), so a handler that always filtered
would be presented nothing at all by it. serve with an empty slice
records nothing and so leaves the handler unfiltered, the same as never
having called it. served reads the set back.
Implementations§
Source§impl HandlerHandle
impl HandlerHandle
Sourcepub fn served(&self) -> &[(InterfaceNo, Ordinal)]
pub fn served(&self) -> &[(InterfaceNo, Ordinal)]
The members serve was called with, in the order they were served,
with no duplicate.
Trait Implementations§
Source§impl Attached for HandlerHandle
impl Attached for HandlerHandle
Source§fn catalog(&self) -> &CatalogRef
fn catalog(&self) -> &CatalogRef
Source§impl Handler for HandlerHandle
impl Handler for HandlerHandle
Source§fn serve(
&mut self,
iface: InterfaceNo,
ords: &[Ordinal],
) -> Result<(), ServeError>
fn serve( &mut self, iface: InterfaceNo, ords: &[Ordinal], ) -> Result<(), ServeError>
Source§fn next_claim(&mut self, out: &mut [u8]) -> Result<Option<Claim>, ReadError>
fn next_claim(&mut self, out: &mut [u8]) -> Result<Option<Claim>, ReadError>
out. Ok(None)
when no call is waiting. ReadError::Short does not consume the call.Source§fn settle(
&mut self,
claim: ClaimId,
outcome: Result<&[u8], CallError>,
) -> Result<(), SettleError>
fn settle( &mut self, claim: ClaimId, outcome: Result<&[u8], CallError>, ) -> Result<(), SettleError>
CallError::Contract when the arguments break their typl
constraints, a require clause fails, or an ensure clause fails,
and CallError::Transport(Transport::Corrupt) when the argument
bytes fail the structure check.