mars-protocol · contract
Public declarations and documentation for mars-protocol::contract.
Package: mars-protocol · Workspace version: 0.1.0 · Module: contract
This reference follows declared modules and public syntax, including public implementation methods. Function bodies and constant values are omitted. Feature conditions are retained. Private-module re-exports and trait resolution require the compiler; not every declaration is a root import.
Module condition
#[cfg(feature = "contracts")]contract::SchemaArtifact
One generated JSON Schema artifact.
#[cfg(feature = "contracts")]
#[derive(Debug, Clone, PartialEq)]
pub struct SchemaArtifact {
/// Repository-relative file name beneath `schemas/v1`.
pub file_name: &'static str,
/// Draft 2020-12 schema document.
pub document: serde_json::Value
}Source line: 7.
contract::schema_artifacts
Generate every frozen MARS v1 JSON Schema from its Rust source type.
The returned order is stable by file name. Callers are responsible for canonical key ordering and filesystem writes.
#[cfg(feature = "contracts")]
pub fn schema_artifacts() -> Result<Vec<SchemaArtifact>, serde_json::Error>;Source line: 18.
Source provenance
Source: mars-protocol/src/contract.rs · SHA-256 039c9d796cda5405d12218d5eb6f74aee844e92d1cf51216f448fdf66302ea88. Package overview.