Skip to main content

PartialField

Type Alias PartialField 

Source
pub type PartialField = Option<Option<Value>>;
Expand description

One field of a partial object: absent (None), explicit null (Some(None)), or a value (Some(Some(_))).

Values are untyped serde_json::Values because conversion must be a total function over anything schema-shaped, including values that do not validate. The type system is used for field names: the partial mirror structs convert via exhaustive destructures, so adding a field to a spec without deciding its conversion does not compile.

Aliased Type§

pub enum PartialField {
    None,
    Some(Option<Value>),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(Option<Value>)

Some value of type T.