Skip to main content

GlobalRegistryClient

Struct GlobalRegistryClient 

Source
pub struct GlobalRegistryClient {
    pub last_assigned_ttl_ns: u64,
    pub last_heartbeat_interval_ns: u64,
    pub last_announce_ts_ns: u64,
}
Expand description

Client half of GlobalRegistry. Holds TTL / heartbeat state echoed from the server’s most recent Handshake; the server peer is wired through the graph at every Announce and is not a struct field.

Fields§

§last_assigned_ttl_ns: u64

TTL the server assigned in its last Handshake response. Stamped into outgoing Announce envelopes as remaining_deadline_ns so receivers can age out stale entries without per-peer state.

§last_heartbeat_interval_ns: u64

Heartbeat interval the server computed in its last Handshake (assigned_ttl_ns / 3). The client respects this interval when throttling subsequent Announces.

§last_announce_ts_ns: u64

Monotonic-ns timestamp of the most recent Announce dispatch. Skipped on snapshot/restore so bootstrap re-seeds the cadence on resume.

Implementations§

Source§

impl GlobalRegistryClient

Source

pub fn new() -> Self

Construct with default TTL state. The server peer is wired through the graph at every Announce op and is not a field.

Trait Implementations§

Source§

impl AnyComponent for GlobalRegistryClient

Source§

fn as_any(&self) -> &dyn Any

Downcast view - immutable.
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Downcast view - mutable.
Source§

impl Bootstrap for GlobalRegistryClient

Source§

type Error = Infallible

Library-maker-defined error type. Must satisfy the standard engine error bounds so the framework can box it into the dispatch error channel.
Source§

fn bootstrap(&mut self, _ctx: &mut BootstrapCtx) -> Result<(), Self::Error>

Run one-shot setup. Default no-op so Components without an initialization phase need no boilerplate. Authors override to mmap state, allocate backend tensors, prime calibration buffers, etc.
Source§

impl Clone for GlobalRegistryClient

Source§

fn clone(&self) -> GlobalRegistryClient

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ConcreteComponent for GlobalRegistryClient

Source§

const TYPE_NAME: &'static str = "GlobalRegistryClient"

Stable identifier. Convention: <crate>::<TypeName>.
Source§

const PACKAGE: ComponentPackage = ::bytesandbrains::concrete::ComponentPackage::Application

Origin tag; defaults to Application.
Source§

const DEPENDENCIES: &'static [DependencyDecl]

Sibling components this depends on. Populated by the bb::Concrete derive from #[bb::depends(...)].
Source§

type Config = ()

Per-deployment config. Use () for stateless concretes.
Source§

type Error = Infallible

Error from Self::new; use Infallible if construction can’t fail.
Source§

fn new(_config: &Self::Config) -> Result<Self, Self::Error>

Construct from &Self::Config. Install calls this once per slot.
Source§

fn serialize(&self) -> Vec<u8>

Serialize state to bytes, including config-derived fields.
Source§

fn restore(bytes: &[u8]) -> Result<Self, RestoreError>

Reconstruct from serialize output.
Source§

impl Debug for GlobalRegistryClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GlobalRegistryClient

Source§

fn default() -> GlobalRegistryClient

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GlobalRegistryClient

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ProtocolRuntime for GlobalRegistryClient

Source§

type Error = OpError

Protocol-impl-specific error type.
Source§

fn atomic_opset(&self) -> AtomicOpsetDecl

Atomic-op opset this protocol declares. Both inbound envelope routing AND user-graph DSL ops register here.
Source§

fn dispatch_atomic( &mut self, op_type: &str, inputs: &[(&str, &dyn SlotValue)], ctx: &mut RuntimeResourceRef<'_>, ) -> Result<DispatchResult, OpError>

Single dispatch entry. For inbound envelopes the framework synthesizes inputs from the wire envelope: Read more
Source§

impl Serialize for GlobalRegistryClient

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedComponent for T
where T: Any + Send + Sync,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> SlotValue for T

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Downcast surface — recover the concrete type.
Source§

fn into_any_boxed(self: Box<T>) -> Box<dyn Any + Sync + Send>

Repackage 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>

Polymorphic clone preserving the concrete type.
Source§

fn to_wire_bytes(&self) -> Result<Vec<u8>, SlotValueError>

Wire-boundary encode (bincode + serde). Local forwarding uses clone_boxed instead.
Source§

fn type_hash(&self) -> u64

Stable cross-Node type discriminator. FNV-1a of std::any::type_name::<T>(); receiver decodes only on a matching hash.
Source§

fn runtime_type(&self) -> &'static TypeNode

Runtime TypeNode for this value. Returns the leaf registered via [register_type_node!] or TYPE_ANY. Consulted at wire boundaries + TypeSolver seeding; the atomic-dispatch hot path uses compile-time-stamped closures.
Source§

fn charged_bytes(&self) -> usize

Bytes the carrier owes against 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!].
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more