pub struct GreedyCapability {
pub enabled: bool,
pub scope: TopologyScope,
pub proximity: u8,
}Expand description
Does this node participate in greedy chain pulls, and within what topology / proximity bounds?
enabled = false is the default — v0.15-era nodes don’t run
greedy admission decisions on inbound events. Operators opt
nodes in via super::capability::CapabilitySet tags.
Fields§
§enabled: boolDoes this node speculatively pull in-scope chains?
scope: TopologyScopeTopology boundary greedy is allowed to cross.
proximity: u8Soft-preference weight, 0..=255. 0 disables greedy
even when enabled = true (operator override without
flipping the flag); high values prefer near peers, low
values tolerate farther peers under cost-tolerant
policies.
Implementations§
Source§impl GreedyCapability
impl GreedyCapability
Sourcepub fn write_into(self, caps: CapabilitySet) -> CapabilitySet
pub fn write_into(self, caps: CapabilitySet) -> CapabilitySet
Write this projection back into a CapabilitySet as
dataforts.greedy.* tags. Producer-side counterpart to
Self::from_capability_set. Tags emitted:
dataforts.greedy.enabled(presence) iffenabled.dataforts.greedy.scope=<wire>whenenabled(the scope claim is only meaningful for participating nodes; emitting it on disabled nodes would mislead the parser).dataforts.greedy.proximity=<n>iffproximity > 0.
Sourcepub fn from_capability_set(caps: &CapabilitySet) -> Self
pub fn from_capability_set(caps: &CapabilitySet) -> Self
Read the projection from a CapabilitySet.
Trait Implementations§
Source§impl Clone for GreedyCapability
impl Clone for GreedyCapability
Source§fn clone(&self) -> GreedyCapability
fn clone(&self) -> GreedyCapability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GreedyCapability
Source§impl Debug for GreedyCapability
impl Debug for GreedyCapability
Source§impl Default for GreedyCapability
impl Default for GreedyCapability
Source§fn default() -> GreedyCapability
fn default() -> GreedyCapability
Source§impl<'de> Deserialize<'de> for GreedyCapability
impl<'de> Deserialize<'de> for GreedyCapability
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 GreedyCapability
Source§impl PartialEq for GreedyCapability
impl PartialEq for GreedyCapability
Source§fn eq(&self, other: &GreedyCapability) -> bool
fn eq(&self, other: &GreedyCapability) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for GreedyCapability
impl Serialize for GreedyCapability
impl StructuralPartialEq for GreedyCapability
Auto Trait Implementations§
impl Freeze for GreedyCapability
impl RefUnwindSafe for GreedyCapability
impl Send for GreedyCapability
impl Sync for GreedyCapability
impl Unpin for GreedyCapability
impl UnsafeUnpin for GreedyCapability
impl UnwindSafe for GreedyCapability
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.