Rust librariesmars-server
mars-server · contracts
Public declarations and documentation for mars-server::contracts.
Package: mars-server · Workspace version: 0.1.0 · Module: contracts
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")]contracts::GeneratedArtifact
A generated contract file and its canonical contents.
#[cfg(feature = "contracts")]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct GeneratedArtifact {
/// Repository-relative output path.
pub relative_path: String,
/// UTF-8 JSON content with stable key ordering and a trailing newline.
pub contents: String
}Source line: 31.
contracts::ContractGenerationError
Contract generation failures.
#[cfg(feature = "contracts")]
#[derive(Debug, thiserror::Error)]
pub enum ContractGenerationError {
/// A Rust-derived schema or OpenAPI value could not be serialized.
#[error("contract serialization failed: {0}")]
Serialization(#[from] serde_json::Error),
}Source line: 40.
contracts::generated_artifacts
Generate the complete frozen contract set from Rust source types.
#[cfg(feature = "contracts")]
pub fn generated_artifacts() -> Result<Vec<GeneratedArtifact>, ContractGenerationError>;Source line: 193.
Source provenance
Source: mars-server/src/contracts.rs · SHA-256 6381de51d0be15e114686dfc9230ff7cf5c434bfafba7da8ca44e68c728920cd. Package overview.