pub struct FieldStatus {
    pub may_be_null: bool,
    pub may_be_normal: bool,
    pub may_be_missing: bool,
    pub may_be_duplicate: bool,
}
Expand description

The FieldStatus keeps track of what kind of values a Field has been found to have.

Fields§

§may_be_null: bool

The Field has been found to be None or of the unit type ().

§may_be_normal: bool

The Field has been found to be a normal value, where normal means any valid value for the Schema associated with the Field.

§may_be_missing: bool

The Field was found only on some Structs or the Sequence to which it belongs might be empty (if only empty sequences are found, then the Schema in the Field will also be None).

§may_be_duplicate: bool

Sometimes a field might appear more than once in the same Struct. In that case all instances are considered, but this flag is also enabled. This is useful to spot suspicious data, but also to detect sequences in xml files. See here for more info.

Implementations§

If the value passed is true, then the status will allow duplicates. Otherwise no changes are made.

true if the status allows for null or missing values.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Merge other into self.
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Merge other into self. Trait object is returned if merging was unsuccessful.
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.