pub struct CanonSpecification {
pub canon: String,
pub type: String,
pub metadata: SpecificationMetadata,
pub includes: Option<Vec<String>>,
pub schema: Option<HashMap<String, SchemaField>>,
pub content: HashMap<String, Value>,
}Expand description
Canon Protocol Specification
This represents ANY Canon document - whether it’s a type definition,
a project specification, or any other kind of Canon specification.
The type field determines what kind of specification this is.
Fields§
§canon: StringProtocol version (e.g., “1.0”)
type: StringType reference - determines what kind of specification this is Examples:
- “canon-protocol.org/type@1.0.0” for type definitions
- “canon-protocol.org/project@1.0.0” for projects
- “content.org/blog-post@1.0.0” for a blog post
metadata: SpecificationMetadataRequired metadata for all specifications
includes: Option<Vec<String>>Optional includes for type composition (used when this is a type definition)
schema: Option<HashMap<String, SchemaField>>Optional schema definition (only present when this is a type definition)
content: HashMap<String, Value>Type-specific content (any fields defined by the type’s schema)
Trait Implementations§
Source§impl Clone for CanonSpecification
impl Clone for CanonSpecification
Source§fn clone(&self) -> CanonSpecification
fn clone(&self) -> CanonSpecification
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CanonSpecification
impl Debug for CanonSpecification
Source§impl<'de> Deserialize<'de> for CanonSpecification
impl<'de> Deserialize<'de> for CanonSpecification
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CanonSpecification
impl RefUnwindSafe for CanonSpecification
impl Send for CanonSpecification
impl Sync for CanonSpecification
impl Unpin for CanonSpecification
impl UnwindSafe for CanonSpecification
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more