pub struct Value {
pub id: Option<String>,
pub description: Option<String>,
pub ref_: Option<String>,
pub min: Option<usize>,
pub max: Option<usize>,
pub validations: Vec<Validation>,
}Expand description
schema for a value
Fields§
§id: Option<String>id of the value (can be used for refs)
description: Option<String>human readable description of the value
ref_: Option<String>KDL query from which to load value information instead of specifying it inline (allows for recursion)
min: Option<usize>minimum number of occurrences of this value
max: Option<usize>maximum number of occurrences of this value
validations: Vec<Validation>validations to apply to this value
Trait Implementations§
Source§impl<S> Decode<S> for Valuewhere
S: ErrorSpan,
impl<S> Decode<S> for Valuewhere
S: ErrorSpan,
Source§fn decode_node(
node: &SpannedNode<S>,
ctx: &mut Context<S>,
) -> Result<Self, DecodeError<S>>
fn decode_node( node: &SpannedNode<S>, ctx: &mut Context<S>, ) -> Result<Self, DecodeError<S>>
Decodes the node from the ast
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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