Skip to main content

parse_hook_dispatch_plan

Function parse_hook_dispatch_plan 

Source
pub fn parse_hook_dispatch_plan(text: &str) -> Option<HookDispatchPlan>
Expand description

What: Read a plan from its JSON text, refusing any other shape. Why: The dispatcher and the lease validator must agree on what a plan is; an unknown event or schema makes the plan unusable.

In TS you’d write (pseudocode):

const plan = JSON.parse(text) as HookDispatchPlan; // checked fields