pub struct FrameworkSnapshot {
pub counters: HashMap<String, u64>,
pub fired_phases: Vec<String>,
pub address_book: Vec<AddressBookEntrySnapshot>,
pub peer_governor: PeerGovernorSnapshot,
pub backoff_table: Vec<BackoffEntry>,
pub pending_outbound: Vec<PendingOutboundEntry>,
pub peer_id_bytes: Vec<u8>,
pub next_command_id: u64,
pub next_exec_id: u64,
pub spec_version: u32,
}Expand description
Serializable view of FrameworkComponents per ENGINE.md §16.
Captures counters, queued lifecycle phases, the multiaddr-keyed
peer registries per docs/ADDRESSING.md, plus the
PeerGovernor + BackoffTable policy/health state introduced
in - so a restored Node remembers
blocklisted peers, allowlist policy, and in-flight backoff
cooldowns across restarts (no thundering herd on cold start).
Other framework primitives (peer_gate inflight counts) stay transient - they’re meaningful only within a single poll cycle.
Fields§
§counters: HashMap<String, u64>Counters from Engine.counters keyed by metric name.
fired_phases: Vec<String>Lifecycle phases queued for next poll() per
Engine.fired_phases.
address_book: Vec<AddressBookEntrySnapshot>AddressBook entries - ordered address list + reference
count per peer (see AddressBookEntrySnapshot).
peer_governor: PeerGovernorSnapshotPeerGovernor policy + health.
backoff_table: Vec<BackoffEntry>Per-peer BackoffTable state.
pending_outbound: Vec<PendingOutboundEntry>Pending outbound envelopes that didn’t make it to a Phase 8
drain before snapshotting. Each entry carries the
redelivered flag so the host’s transport adapter can
decide whether to retry or drop after restore.
peer_id_bytes: Vec<u8>Canonical multihash bytes for the Node’s PeerId. Restore
reconstructs the PeerId via PeerId::from_bytes(&peer_id_bytes),
round-tripping every multihash code (identity, sha2-256,
blake2b, …) without information loss.
next_command_id: u64Engine ID counter persistence. The previous
snapshot dropped next_command_id / next_exec_id, so a
restored Node would mint ID 0 again — colliding with any
in-flight command/exec the pre-snapshot Node had issued.
next_exec_id: u64Same for ExecIds.
spec_version: u32Snapshot schema version (incarnation distinct). Bumped when the FrameworkSnapshot shape changes in a way older code cannot soundly restore from.
Trait Implementations§
Source§impl Clone for FrameworkSnapshot
impl Clone for FrameworkSnapshot
Source§fn clone(&self) -> FrameworkSnapshot
fn clone(&self) -> FrameworkSnapshot
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 FrameworkSnapshot
impl Debug for FrameworkSnapshot
Source§impl Default for FrameworkSnapshot
impl Default for FrameworkSnapshot
Source§fn default() -> FrameworkSnapshot
fn default() -> FrameworkSnapshot
Source§impl<'de> Deserialize<'de> for FrameworkSnapshot
impl<'de> Deserialize<'de> for FrameworkSnapshot
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>,
Auto Trait Implementations§
impl Freeze for FrameworkSnapshot
impl RefUnwindSafe for FrameworkSnapshot
impl Send for FrameworkSnapshot
impl Sync for FrameworkSnapshot
impl Unpin for FrameworkSnapshot
impl UnsafeUnpin for FrameworkSnapshot
impl UnwindSafe for FrameworkSnapshot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
impl<T> ErasedComponent for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SlotValue for T
impl<T> SlotValue for T
Source§fn into_any_boxed(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any_boxed(self: Box<T>) -> Box<dyn Any + Sync + Send>
Box<dyn SlotValue> as Box<dyn Any> for
Box::downcast. Required because the SlotValue and
Any vtables are distinct even though SlotValue: Any.Source§fn clone_boxed(&self) -> Box<dyn SlotValue>
fn clone_boxed(&self) -> Box<dyn SlotValue>
Source§fn to_wire_bytes(&self) -> Result<Vec<u8>, SlotValueError>
fn to_wire_bytes(&self) -> Result<Vec<u8>, SlotValueError>
clone_boxed instead.Source§fn type_hash(&self) -> u64
fn type_hash(&self) -> u64
std::any::type_name::<T>(); receiver decodes only on a
matching hash.Source§fn runtime_type(&self) -> &'static TypeNode
fn runtime_type(&self) -> &'static TypeNode
Source§fn charged_bytes(&self) -> usize
fn charged_bytes(&self) -> usize
NodeConfig::ingress_byte_budget. Slot-table eviction calls
this to release the charge. Default 0 — only
ingress-derived carriers register a non-zero resolver via
[register_charged_bytes!].