Skip to main content

evaluate_accessible_layers

Function evaluate_accessible_layers 

Source
pub fn evaluate_accessible_layers(
    vault: &KeyVault,
    vc: &VcAttributes,
    trusted_issuers: &[u64],
    out: &mut [Option<(SubgraphLayer, SubgraphKey)>],
) -> usize
Expand description

Convenience: evaluate which layers the agent can access and write the permitted keys into out, in ascending layer order.

Zero-heap: writes at most out.len().min(5) (SubgraphLayer, SubgraphKey) entries (one per layer) into the caller-supplied slice and returns the count written. SubgraphKey is move-only (it zeroizes on drop), so out is a slice of Option<…>; written entries are Some. This function is not on a hot path.