Skip to main content

resolve_consume_prefix

Function resolve_consume_prefix 

Source
pub fn resolve_consume_prefix(
    prefix: &str,
    consumed: &[String],
    aliases: &HashMap<String, String>,
) -> Option<String>
Expand description

v0.15’s cross-context capability resolution, relocated alongside phase_platform_lock (P5.3): resolve a given/handler capability prefix (ctx.Cap) against a context’s own consumes/alias tables. Pure — no codegen, no bynk-emit dependency of its own — so unlike collect_given_closure this one is shared rather than duplicated: bynk-emit/src/project.rs’s own copy of this function (and of handler_cross_caps) was deleted in review (#1133) and every one of its call sites repointed here — bynk-emit already depends on bynk-check, so there was no dependency direction to route around, and keeping two copies only bought two things that could drift out of sync for no reason.