pub struct Prop {
pub key: Option<String>,
pub id: Option<String>,
pub description: Option<String>,
pub ref_: Option<String>,
pub required: bool,
pub validations: Vec<Validation>,
}Expand description
schema for a property
Fields§
§key: Option<String>property key (applies to all properties in this node if None)
id: Option<String>id of the property (can be used for refs)
description: Option<String>human-readable description of the property
ref_: Option<String>KDL query from which to load property information instead of specifying it inline (allows for recursion)
required: boolwhether or not this property is required
validations: Vec<Validation>validations to apply to the property value
Trait Implementations§
Source§impl<S> Decode<S> for Propwhere
S: ErrorSpan,
impl<S> Decode<S> for Propwhere
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 Prop
impl StructuralPartialEq for Prop
Auto Trait Implementations§
impl Freeze for Prop
impl RefUnwindSafe for Prop
impl Send for Prop
impl Sync for Prop
impl Unpin for Prop
impl UnwindSafe for Prop
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