pub enum ObjectAdditionalProperties {
Forbidden,
Untyped,
Typed {
value_type: Box<SchemaType>,
},
}Expand description
How an Object handles additionalProperties. Q2.3 split the
pre-existing bool into a three-way enum so the generator can
emit a typed BTreeMap<String, T> when the spec provides a
value-type schema instead of degrading to serde_json::Value.
Variants§
Forbidden
additionalProperties: false or absent — extra keys are
rejected and no extra field is emitted.
Untyped
additionalProperties: true — extra keys captured as
BTreeMap<String, serde_json::Value>.
Typed
additionalProperties: <schema> — extra keys captured as
BTreeMap<String, T> where T comes from the schema.
Fields
§
value_type: Box<SchemaType>Implementations§
Trait Implementations§
Source§impl Clone for ObjectAdditionalProperties
impl Clone for ObjectAdditionalProperties
Source§fn clone(&self) -> ObjectAdditionalProperties
fn clone(&self) -> ObjectAdditionalProperties
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ObjectAdditionalProperties
impl RefUnwindSafe for ObjectAdditionalProperties
impl Send for ObjectAdditionalProperties
impl Sync for ObjectAdditionalProperties
impl Unpin for ObjectAdditionalProperties
impl UnsafeUnpin for ObjectAdditionalProperties
impl UnwindSafe for ObjectAdditionalProperties
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