pub enum ScopeFilter<'a> {
Any,
GlobalOnly,
SameSubnet,
Tenant(&'a str),
Tenants(&'a [&'a str]),
Region(&'a str),
Regions(&'a [&'a str]),
}Expand description
Caller’s intent for narrowing peer discovery by reserved scope
tags. The legacy CapabilityIndex::find_nodes_scoped /
find_best_node_scoped callers were rewired to the
CapabilityFold in Phase 3B; this filter still parameterizes
the scope-axis decision on the fold side.
Any reproduces v1 behavior for non-SubnetLocal peers but
excludes peers that explicitly tagged themselves
scope:subnet-local — that tag is an opt-out from cross-subnet
discovery.
Variants§
Any
Match every peer regardless of scope, except those tagged
scope:subnet-local (which always require Self::SameSubnet).
GlobalOnly
Match only peers with no scope:* tag (resolve to
Global). Useful for opting out of all scoped peers.
SameSubnet
Match peers whose subnet equals the caller’s. The actual
subnet comparison is supplied by the caller (typically by
closing over MeshNode::peer_subnets); the index doesn’t
own subnet state.
Tenant(&'a str)
Match peers tagged scope:tenant:<t> OR untagged
(Global is permissive across tenants by design).
Tenants(&'a [&'a str])
Match peers tagged scope:tenant:<t> for any t in the
list, OR untagged.
Region(&'a str)
Match peers tagged scope:region:<r> OR untagged.
Regions(&'a [&'a str])
Match peers tagged scope:region:<r> for any r in the
list, OR untagged.
Trait Implementations§
Source§impl<'a> Clone for ScopeFilter<'a>
impl<'a> Clone for ScopeFilter<'a>
Source§fn clone(&self) -> ScopeFilter<'a>
fn clone(&self) -> ScopeFilter<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more