#[non_exhaustive]pub struct ModuleManifest {
pub module_id: String,
pub module_version: String,
pub protocol_ver: u8,
pub trust_tier: Option<TrustTier>,
pub provides: Vec<ProviderRole>,
pub consumes: Vec<ConsumerRole>,
pub bindings: Option<Bindings>,
pub capabilities: Option<CapabilityDeclarations>,
pub self_signals: Option<Vec<SelfSignalDeclaration>>,
pub provenance: Option<ManifestProvenance>,
}Expand description
A module’s full declared participation in the subc mesh.
Construct via ModuleManifest::builder(), never a struct literal. Adding a
field to this struct would break every direct construction site; builder methods
are additive, so constructors written against an older revision continue
compiling when later fields land.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.module_id: String§module_version: String§protocol_ver: u8§trust_tier: Option<TrustTier>§provides: Vec<ProviderRole>Existing role declarations; capability grammar claims deliberately live in
the separate CapabilityDeclarations block below.
consumes: Vec<ConsumerRole>§bindings: Option<Bindings>§capabilities: Option<CapabilityDeclarations>Optional capability-grammar declarations.
Omitting this block preserves the manifest contract used before capability grammar was introduced. A present block is static discovery metadata that the daemon validates before accepting a HELLO.
self_signals: Option<Vec<SelfSignalDeclaration>>Periodic or event-driven behavior this module performs against an external surface, so later analysts can account for the resulting self-shaped time series.
Declarations describe the EFFECTIVE values in force at HELLO time. In
particular, a compile-time cadence constant belongs in
SignalCadence::Literal, while a cadence resolved from configuration
belongs in SignalCadence::Derived with a pointer to that effective
source. Both provenance stories are honest; copying a stale configured
value into a literal is not.
Ephemeral signals are out of scope for v1 because they are not durably declarable, not because they are harmless. A v2 reader must not interpret this field’s absence in a v1 manifest as a judgement about ephemerals.
None and Some(vec![]) are deliberately distinct on the wire: an
absent block means the module has not adopted this vocabulary (readers
treat it as zero signals but must not treat it as a survey answer),
while an empty list is an affirmative declaration that the module
examined its effects and claims none are declarable. Modules that mean
“no signals” should declare the empty list; None is what an
un-adopted manifest looks like, not a statement.
Convention for mutate-effect entries: where the mutation leaves a
per-observation tell on the surface itself (insula publishes the
relaxed usedPercent beside the raw figure, so any single reading
self-reports whether it was touched), name that tell in the
declaration’s note. A standing registry row says the module sometimes
mutates; the tell says whether THIS observation was mutated — a
consumer holding one sample can act on the second, not the first.
A named tell must exist on the wire independently of this registry:
the declaration points at evidence, it is never the evidence. A tell
that exists only because the manifest describes it is a claim
vouching for itself.
provenance: Option<ManifestProvenance>Implementations§
Source§impl ModuleManifest
impl ModuleManifest
Sourcepub fn builder(
module_id: impl Into<String>,
module_version: impl Into<String>,
) -> ModuleManifestBuilder
pub fn builder( module_id: impl Into<String>, module_version: impl Into<String>, ) -> ModuleManifestBuilder
Starts a manifest builder with the minimal identification fields.
protocol_ver defaults to the protocol version linked into this crate;
provides and consumes default to empty declarations. trust_tier
and bindings default to None because the daemon reads neither on any
production path; a required unread field forces producers to invent
fabricated values.
Source§impl ModuleManifest
impl ModuleManifest
Sourcepub fn validate_capability_grammar(&self) -> Result<(), CapabilityGrammarError>
pub fn validate_capability_grammar(&self) -> Result<(), CapabilityGrammarError>
Validate the typed capability block after serde has decoded it.
Trait Implementations§
Source§impl Clone for ModuleManifest
impl Clone for ModuleManifest
Source§fn clone(&self) -> ModuleManifest
fn clone(&self) -> ModuleManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more