pub struct TypeField {
pub name: String,
pub ty: TypeRef,
pub docs: Option<String>,
pub span: Span,
pub constraints: Vec<FieldConstraint>,
}Fields§
§name: String§ty: TypeRef§docs: Option<String>§span: Span§constraints: Vec<FieldConstraint>Field-level validation constraints declared via matches /re/,
at_least_items 3, prose "..." lines, etc. Attached by the parser
to the most recent field whose span.col matches the constraint’s
column (see parser.rs constraint attachment rules). #[serde(default)]
so ASTs serialized before constraints existed still deserialize.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TypeField
impl<'de> Deserialize<'de> for TypeField
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 TypeField
impl RefUnwindSafe for TypeField
impl Send for TypeField
impl Sync for TypeField
impl Unpin for TypeField
impl UnsafeUnpin for TypeField
impl UnwindSafe for TypeField
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