pub fn resolve(
name: &str,
declaring_unit: &str,
flattened_caps: &HashMap<String, String>,
) -> Option<FirstPartyCap>Expand description
Whether the capability name, as seen from the unit declaring_unit (the unit
whose source the name appears in, or the provider’s own unit), is bynk’s own, and
which one. flattened_caps is that unit’s flattened-consume map (a bare
consumes bynk { Cap } makes Cap a local name for the bynk unit’s).
First-party when the name is one of FirstPartyCap’s and either this unit is
bynk (the capability is declared right here) or consumes bynk { name }
flattened it in. This is the single copy of the rule (#934): a same-named
capability from another unit (the #926/#931 generic-operation fixtures’ own
illustrative capability Idempotency) must not be scoped.