pub struct Contract {
pub id: String,
pub kind: String,
pub subclass: ContractSubclass,
pub producer: String,
pub consumers: Vec<String>,
pub operations: Vec<String>,
pub evidence: Vec<String>,
}Expand description
One first-class contract in the atlas (Wave 9): a typed, evidence-backed
contract surface (http/cli/event/config/annotation) with its producer
symbol and the symbols that consume it. operations carries the concrete
contract strings (route GET /api/x, flag --paging, event
user.created, config key DEBUG, annotation router.get).
Fields§
§id: String§kind: String"http" | "cli" | "event" | "config" | "annotation".
subclass: ContractSubclassSemantic contract subclass (Contract ontology): the typed family
derived from general evidence — http/cli/event/config from
route/flag/topic/config facts, public-api from exported fn
signatures, serialization from serializer/deserializer pairs,
extension from interface+implementations, and extractor-emitted
registration kinds mapped by ContractSubclass::from_kind_str.
producer: StringProducer entity id (handler symbol, owning symbol, topic, …).
consumers: Vec<String>Consuming entity ids (symbols with HANDLES/CONSUMES/READS edges).
operations: Vec<String>Concrete contract strings rendered as {kind}: {operation}.
evidence: Vec<String>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Contract
impl<'de> Deserialize<'de> for Contract
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Contract
impl JsonSchema for Contract
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more