pub struct Field<C: Context = DefaultContext> {
pub status: FieldStatus,
pub schema: Option<Schema<C>>,
}Expand description
Fields§
§status: FieldStatusThe status holds information on the the field, like whether it might be null or missing altogether. Duplicate fields are also recorded.
schema: Option<Schema<C>>The inner Schema is optional because we might have no information on the shape of the field (like for an empty array).
Implementations§
Source§impl<C: Context> Field<C>
impl<C: Context> Field<C>
Sourcepub fn with_schema(schema: Schema<C>) -> Self
pub fn with_schema(schema: Schema<C>) -> Self
Returns a Field with the given Schema and default FieldStatus.
Trait Implementations§
Source§impl<'de, C: Context> Deserialize<'de> for Field<C>where
Schema<C>: Deserialize<'de>,
impl<'de, C: Context> Deserialize<'de> for Field<C>where
Schema<C>: Deserialize<'de>,
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
Source§impl<C: Context> StructuralEq for Field<C>where
Schema<C>: StructuralEq,
impl<C: Context> StructuralEq for Field<C>where
Schema<C>: StructuralEq,
Source§fn structural_eq(&self, other: &Self) -> bool
fn structural_eq(&self, other: &Self) -> bool
Returns
true if self and other share the same structure.Source§fn structural_ne(&self, other: &Rhs) -> bool
fn structural_ne(&self, other: &Rhs) -> bool
Returns
true if self and other DO NOT share the same structure.Auto Trait Implementations§
impl<C> Freeze for Field<C>
impl<C> RefUnwindSafe for Field<C>where
<C as Context>::Null: RefUnwindSafe,
<C as Context>::Boolean: RefUnwindSafe,
<C as Context>::Integer: RefUnwindSafe,
<C as Context>::Float: RefUnwindSafe,
<C as Context>::String: RefUnwindSafe,
<C as Context>::Bytes: RefUnwindSafe,
<C as Context>::Sequence: RefUnwindSafe,
<C as Context>::Struct: RefUnwindSafe,
impl<C> Send for Field<C>
impl<C> Sync for Field<C>
impl<C> Unpin for Field<C>
impl<C> UnsafeUnpin for Field<C>where
<C as Context>::Null: UnsafeUnpin,
<C as Context>::Boolean: UnsafeUnpin,
<C as Context>::Integer: UnsafeUnpin,
<C as Context>::Float: UnsafeUnpin,
<C as Context>::String: UnsafeUnpin,
<C as Context>::Bytes: UnsafeUnpin,
<C as Context>::Sequence: UnsafeUnpin,
<C as Context>::Struct: UnsafeUnpin,
impl<C> UnwindSafe for Field<C>where
<C as Context>::Null: UnwindSafe,
<C as Context>::Boolean: UnwindSafe,
<C as Context>::Integer: UnwindSafe,
<C as Context>::Float: UnwindSafe,
<C as Context>::String: UnwindSafe,
<C as Context>::Bytes: UnwindSafe,
<C as Context>::Sequence: UnwindSafe,
<C as Context>::Struct: UnwindSafe,
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