Skip to content

vox-populi-types API Reference (generated)

Crate: vox-populi-types · Version: 0.6.0 · Target: Library (lib.rs)

Pure-data types for the Populi mesh: NodeRecord, PopuliRegistryFile, and helpers. L2 — no async runtime, no database.

Pure-data types for the Vox Populi mesh layer.

This crate holds the topology and node-record types that sit at L2 (same layer as vox-repository). They cannot live at L0 (vox-mesh-types) because [NodeRecord] embeds [vox_repository::TaskCapabilityHints] (also L2).

  • No async runtime, no database, no HTTP client.
  • All types implement Debug + Clone + Serialize + Deserialize.
  • vox-populi (L3) depends on this crate and re-exports its public surface for backwards compatibility. Callers can depend directly on vox-populi-types when they only need the data types.
DependencyKind
vox-mesh-typesNormal
vox-repositoryNormal
ModuleDescription
node_record—
Dependency Topology, diagram 14 nodes, 3 edges: vox-populi-types → vox-mesh-types; vox-populi-types → vox-repository; vox-populi → vox-populi-typesvox-populi-typesvox-mesh-typesvox-repositoryvox-populi
Diagram source
graph {
direction: right
node vox_populi_types: "vox-populi-types"
node vox_mesh_types: "vox-mesh-types"
vox_populi_types -> vox_mesh_types
node vox_repository: "vox-repository"
vox_populi_types -> vox_repository
node vox_populi: "vox-populi"
vox_populi -> vox_populi_types
}
Consumer CrateRole
vox-populiDirect workspace dependent
KindSymbolSignatureSourceDescription
structnode_record::NodeRecordpub struct NodeRecordcrates/vox-populi-types/src/node_record.rs#L11-L123One participant in the populi view.
structnode_record::PopuliRegistryFilepub struct PopuliRegistryFilecrates/vox-populi-types/src/node_record.rs#L127-L135Serializable registry file (.vox/cache/populi/local-registry.json).
fnnode_record::filter_registry_by_max_stale_mspub fn filter_registry_by_max_stale_ms(crates/vox-populi-types/src/node_record.rs#L143Drop nodes whose last_seen_unix_ms is older than now - max_stale_ms. max_stale_ms = None or 0 returns the file unchanged.
fnnode_record::merge_registry_by_last_seenpub fn merge_registry_by_last_seen(crates/vox-populi-types/src/node_record.rs#L162Merge incoming (control-plane truth) into local, deduped by id, keeping the record with the greater last_seen_unix_ms. Ties resolve to incoming (the control plane is authoritative). Never mutates timestamps. schema_version becomes the max; queue_depth prefers the live incoming value. Output node order is sorted by id for deterministic on-disk + test output.
fnnode_record::node_maintenance_blocks_new_workpub fn node_maintenance_blocks_new_work(now_ms: u64, n: &NodeRecord) -> boolcrates/vox-populi-types/src/node_record.rs#L192-L202Whether this node should block new claims / exec lease grant+renew (drain semantics).
fnnode_record::sweep_expired_maintenance_on_nodespub fn sweep_expired_maintenance_on_nodes(nodes: &mut [NodeRecord], now_ms: u64)crates/vox-populi-types/src/node_record.rs#L205-L212Clear [NodeRecord::maintenance] / deadline when the deadline has passed.
enumnode_record::PopuliRegistryErrorpub enum PopuliRegistryErrorcrates/vox-populi-types/src/node_record.rs#L217-L237Registry I/O errors. Defined here so vox-populi-types consumers can match on them without depending on vox-populi.
fnnode_record::status_codepub fn status_code(&self) -> Option<u16>crates/vox-populi-types/src/node_record.rs#L242-L247Status code when this error came from an HTTP status failure.
fnnode_record::is_http_statuspub fn is_http_status(&self, code: u16) -> boolcrates/vox-populi-types/src/node_record.rs#L251-L253Convenience predicate for status-code branching.