pub enum Spec {
Node(Box<Node>),
Token(Token),
Value(Value),
Obj(Vec<(String, Spec)>),
Arr(Vec<Spec>),
Regex(Regex),
Regexp(String),
}Expand description
A spec by example.
Variants§
Node(Box<Node>)
A compiled node: a builder’s result.
Token(Token)
A type token: a required kind.
Value(Value)
A literal: optional, its own default.
Obj(Vec<(String, Spec)>)
An object spec, keys in order.
Arr(Vec<Spec>)
An array spec: empty, one child shape, or a tuple.
Regex(Regex)
A regular expression: a required string matching it.
Regexp(String)
A regexp as its pattern text, in the shared subset: what the string form reads, and what a JSON Schema pattern imports.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Spec
impl !UnwindSafe for Spec
impl Freeze for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Spec
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