Skip to main content

check_handler_body

Function check_handler_body 

Source
pub fn check_handler_body(
    body: &Block,
    return_type: &TypeRef,
    return_ty_span: Span,
    params: &[Param],
    input: &ResolvedCommons,
    expr_types: &mut HashMap<Span, Ty>,
    errors: &mut Vec<CompileError>,
    refs: &mut RefSink,
    hints: &mut HintSink,
    locals: &mut LocalsSink,
    requirements: &mut RequirementSink,
    capabilities: HashMap<String, CapabilityInfo>,
    declared_capabilities: HashMap<String, CapabilityInfo>,
    agent_state_ty: Option<Ty>,
    agent_self_scope: Option<HashMap<String, Ty>>,
    given: &[CapRef],
    given_anchor: Option<Span>,
    report_unused: bool,
    actor_binding: Option<(String, Ty)>,
    store_cells: HashMap<String, Ty>,
    store_maps: HashMap<String, (Ty, Ty)>,
    store_sets: HashMap<String, Ty>,
    store_caches: HashMap<String, (Ty, Ty, i64)>,
    store_logs: HashMap<String, Ty>,
    borrowed_held: HashSet<String>,
)
Expand description

Check a single handler body (used for service and agent handlers).

capabilities_in_scope is the set of capabilities the handler may reference. agent_state_ty carries an agent handler’s synthetic state-record type when one is in scope.