pub enum ContractSubclass {
CallContract,
PublicApi,
Http,
Rpc,
Cli,
Event,
Message,
Schema,
Configuration,
Plugin,
Extension,
Serialization,
}Expand description
First-class contract subclass (Contract ontology): the semantic contract
family, derived by the extractors from general evidence (public fn
signatures, builder/factory structure, event producer/consumer pairs,
serializer/deserializer pairs, interface+implementations, route/flag/
topic/config facts) and rendered by the atlas as per-subclass groups.
The legacy kind string stays for back-compat; subclass is the typed
family (http/cli/event/config/public-api/extension/
serialization/…).
Variants§
CallContract
A callable contract surface (framework callback, task, annotated handler, middleware): the framework invokes this callable.
PublicApi
Public API export (function/method signature surface).
Http
HTTP route.
Rpc
RPC method.
Cli
CLI flag / subcommand.
Event
Event (topic with producers/consumers).
Message
Message / queue surface.
Schema
Schema definition (validation/model schema).
Configuration
Configuration key.
Plugin
Plugin registration.
Extension
Extension point: interface + implementations.
Serialization
Serialization pair (serializer/deserializer around a type).
Implementations§
Source§impl ContractSubclass
impl ContractSubclass
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Render prefix used by the atlas CONTRACTS section (stable, sorted:
http: GET /x, cli: --flag, event: user.created, config: DEBUG,
public-api: Class.method, extension: PluginX, serialization: toJson/fromJson).
Sourcepub fn from_kind_str(kind: &str) -> Option<ContractSubclass>
pub fn from_kind_str(kind: &str) -> Option<ContractSubclass>
Map a contract/registration kind string to its first-class subclass.
None for framework-specific registration kinds (include_router,
add_middleware, …) that stay framework semantics instead of
first-class contracts. factory → PublicApi and builder →
Configuration are the ontology’s builder/factory rule.
Trait Implementations§
Source§impl Clone for ContractSubclass
impl Clone for ContractSubclass
impl Copy for ContractSubclass
Source§impl Debug for ContractSubclass
impl Debug for ContractSubclass
Source§impl Default for ContractSubclass
impl Default for ContractSubclass
Source§impl<'de> Deserialize<'de> for ContractSubclass
impl<'de> Deserialize<'de> for ContractSubclass
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>,
impl Eq for ContractSubclass
Source§impl Hash for ContractSubclass
impl Hash for ContractSubclass
Source§impl JsonSchema for ContractSubclass
impl JsonSchema for ContractSubclass
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