pub struct FieldSpec {
pub key: &'static str,
pub aliases: &'static [&'static str],
pub required: bool,
}Expand description
Static description of one field of a model.
Fields§
§key: &'static strKey Serde deserializes the field from (after rename/rename_all).
aliases: &'static [&'static str]Other accepted input keys (validation aliases; the Rust field name
when populate_by_name). Sending more than one of the key and its
aliases is a duplicate_field error.
required: boolWhether a missing key is an error (no Option, no default).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldSpec
impl RefUnwindSafe for FieldSpec
impl Send for FieldSpec
impl Sync for FieldSpec
impl Unpin for FieldSpec
impl UnsafeUnpin for FieldSpec
impl UnwindSafe for FieldSpec
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