pub enum SchemaNodeContent {
Show 13 variants
Any,
Text(TextSchema),
Integer(IntegerSchema),
Float(FloatSchema),
Boolean,
Null,
Literal(EureDocument),
Array(ArraySchema),
Map(MapSchema),
Record(RecordSchema),
Tuple(TupleSchema),
Union(UnionSchema),
Reference(TypeReference),
}Expand description
Type definitions with their specific constraints
See spec: eure-schema.schema.eure lines 298-525
Variants§
Any
Any type - accepts any valid Eure value Spec: line 391
Text(TextSchema)
Text type
§Language Matching
When validating text values:
Language::Plaintext(from"...") must match.textschema onlyLanguage::Implicit(from`...`) can be coerced to any language by schemaLanguage::Other(lang)(fromlang`...`) must match.text.{lang}schema
Spec: lines 333-349
Integer(IntegerSchema)
Integer type with optional constraints Spec: lines 360-364
Float(FloatSchema)
Float type with optional constraints Spec: lines 371-375
Boolean
Boolean type (no constraints) Spec: line 383
Null
Null type Spec: line 387
Literal(EureDocument)
Literal type - accepts only the exact specified value Spec: line 396
Array(ArraySchema)
Array type with item schema and optional constraints Spec: lines 426-439
Map(MapSchema)
Map type with dynamic keys Spec: lines 453-459
Record(RecordSchema)
Record type with fixed named fields Spec: lines 401-410
Tuple(TupleSchema)
Tuple type with fixed-length ordered elements Spec: lines 465-468
Union(UnionSchema)
Union type with named variants Spec: lines 415-423
Reference(TypeReference)
Type reference (local or cross-schema) Spec: lines 506-510
Implementations§
Source§impl SchemaNodeContent
impl SchemaNodeContent
Sourcepub fn kind(&self) -> SchemaKind
pub fn kind(&self) -> SchemaKind
Returns the kind of this schema node.
Trait Implementations§
Source§impl Clone for SchemaNodeContent
impl Clone for SchemaNodeContent
Source§fn clone(&self) -> SchemaNodeContent
fn clone(&self) -> SchemaNodeContent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more