Skip to main content

Metadata

Struct Metadata 

Source
pub struct Metadata {
Show 13 fields pub version: String, pub created: Option<String>, pub author: Option<String>, pub description: String, pub references: Vec<String>, pub depends_on: Vec<String>, pub registry: bool, pub kind: ContractKind, pub enforcement_level: Option<EnforcementLevel>, pub locked_level: Option<String>, pub competitor: Option<String>, pub demand_score: Option<i64>, pub intake_status: Option<IntakeStatus>,
}
Expand description

Contract metadata block.

Fields§

§version: String§created: Option<String>§author: Option<String>§description: String§references: Vec<String>§depends_on: Vec<String>

Contract dependencies — other contracts this one composes. Values are contract stems (e.g. “silu-kernel-v1”).

§registry: bool

Legacy registry flag — prefer metadata.kind: registry for new contracts.

§kind: ContractKind

Contract kind. Defaults to ContractKind::Kernel.

§enforcement_level: Option<EnforcementLevel>

Per-contract enforcement level (Section 17, Gap 1). basic → schema valid; standard → + falsification + kani; strict → + all bindings implemented; proven → + Lean 4 proved.

§locked_level: Option<String>

Once set, the contract cannot drop below this verification level without an explicit pv unlock (Section 17, Gap 5).

§competitor: Option<String>

CRUX competitive-research story: which competitor’s UX the story was extracted from. Membership-checked against the CRUX_COMPETITORS registry in schema/validator.rs (rule CRUX-002).

NORMALISED ON PARSE (trimmed). The validator used to .trim() before comparing, so competitor: " ecosystem " passed CRUX-002 while the stored value kept its padding: the gate laundered a value it never fixed, and every consumer reading this field still saw the untrimmed string. Trimming here means the checked value and the stored value are the same value.

§demand_score: Option<i64>

CRUX competitive-research story: demand, documented 1..=5 by contracts/crux-competitive-research-ux-v1.yaml §“demand_score (1..5)”. Range-checked by rule CRUX-001.

Deliberately i64, not u8: an out-of-range value must reach the validator and be reported as demand_score 99999 is outside 1..=5, not die in serde as an opaque integer-overflow message.

§intake_status: Option<IntakeStatus>

CRUX competitive-research story: intake status. A closed enum, so an invented value FAILS TO PARSE (see IntakeStatus).

Trait Implementations§

Source§

impl Clone for Metadata

Source§

fn clone(&self) -> Metadata

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 Debug for Metadata

Source§

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

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

impl Default for Metadata

Source§

fn default() -> Metadata

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

impl<'de> Deserialize<'de> for Metadata

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 Serialize for Metadata

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = !

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.