Skip to main content

sequence_model

Function sequence_model 

Source
pub fn sequence_model(
    handler: &Handler,
    owner: HandlerOwner<'_>,
    default_given: &[CapRef],
    default_by: Option<&ByClause>,
    info: Option<&ContextSequenceInfo>,
) -> SequenceModel
Expand description

default_given is the owning service’s service-level given default (v0.155, ServiceDecl.default_given) — a handler that declares no given of its own inherits it. This classifier walks a freshly-parsed AST that has not been through bynk-emit’s inject_service_defaults normalization pass (which is what mutates handler.given in the compile pipeline), so the fallback has to be applied here or a handler relying on the service default would drop every capability lifeline. Pass &[] when there is no default (always the case for HandlerOwner::Agent — agents have no service-level given). default_by is the owning service’s service-level by default (v0.155, ServiceDecl.default_by) — a handler that declares no by of its own inherits it, exactly as it does the given default. Pass None for an agent (agents have no principal).