pub struct CapabilityMembership {
pub class_hash: u64,
pub tags: Vec<String>,
pub hardware: Option<HardwareSummary>,
pub state: NodeState,
pub region: Option<String>,
pub price_quote: Option<u64>,
pub reflex_addr: Option<SocketAddr>,
pub allowed_nodes: Vec<u64>,
pub allowed_subnets: Vec<SubnetId>,
pub allowed_groups: Vec<GroupId>,
pub metadata: BTreeMap<String, String>,
}Expand description
Wire payload for one capability announcement. The publisher
declares its own membership in class_hash.
Fields§
§class_hash: u64Capability class this announcement is about. Each announcement covers one (class, publisher) pair; a publisher in multiple classes emits one announcement per class.
Canonical-form tag strings the publisher claims
(e.g. "hardware.gpu", "hardware.gpu.vram_gb=80",
"causal:<hex>"). See the module doc on tag
representation.
hardware: Option<HardwareSummary>Optional hardware projection for fast filtering.
state: NodeStateCurrent state — the load-bearing filter for the scheduler’s “find idle candidates” path.
region: Option<String>Optional region string. Free-form; operator chooses
the granularity ("us-east", "us-east.dc-1", etc.).
price_quote: Option<u64>Optional price-per-unit quote for compute-marketplace workloads. Units intentionally opaque (operator decides — could be µ$/sec, µ$/job, µ$/GPU-hour).
reflex_addr: Option<SocketAddr>Publisher’s last-advertised public reflex SocketAddr.
Used by NAT-traversal rendezvous (stage 3) to look up
the punch target’s public address. The publisher emits
this whenever it observes its own public side via a
reflex probe; receivers cache it across class entries
(one publisher tends to publish the same reflex across
every class it joins).
allowed_nodes: Vec<u64>v0.4 capability-auth allow-list — peer node_ids
authorized to invoke any of this publisher’s tags. Empty
= unrestricted (permissive default). Union semantics with
allowed_subnets and allowed_groups; the caller is
admitted if it matches at least one populated axis.
allowed_subnets: Vec<SubnetId>v0.4 capability-auth allow-list — caller subnets authorized
to invoke this publisher’s tags. Same union semantics as
allowed_nodes.
allowed_groups: Vec<GroupId>v0.4 capability-auth allow-list — caller groups authorized
to invoke this publisher’s tags. Same union semantics as
allowed_nodes.
metadata: BTreeMap<String, String>Free-form per-publisher metadata. Carries the same opaque
key/value pairs the legacy
CapabilitySet::metadata
exposes; predicates that test metadata_exists/
metadata_equals consult this map after synthesize_capability_set
hydrates the synthesized set from the fold.
Trait Implementations§
Source§impl Clone for CapabilityMembership
impl Clone for CapabilityMembership
Source§fn clone(&self) -> CapabilityMembership
fn clone(&self) -> CapabilityMembership
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CapabilityMembership
impl Debug for CapabilityMembership
Source§impl<'de> Deserialize<'de> for CapabilityMembership
impl<'de> Deserialize<'de> for CapabilityMembership
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CapabilityMembership
Source§impl PartialEq for CapabilityMembership
impl PartialEq for CapabilityMembership
Source§fn eq(&self, other: &CapabilityMembership) -> bool
fn eq(&self, other: &CapabilityMembership) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CapabilityMembership
impl Serialize for CapabilityMembership
impl StructuralPartialEq for CapabilityMembership
Auto Trait Implementations§
impl Freeze for CapabilityMembership
impl RefUnwindSafe for CapabilityMembership
impl Send for CapabilityMembership
impl Sync for CapabilityMembership
impl Unpin for CapabilityMembership
impl UnsafeUnpin for CapabilityMembership
impl UnwindSafe for CapabilityMembership
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.