pub enum FieldChange {
Set {
field_type: FieldType,
options: ParseMap,
},
Delete,
}Expand description
What a fields entry in a schema-API body asks for.
Delete is spelled {"__op":"Delete"} on the wire and is only meaningful on PUT. Modelled
as a variant rather than as a flag on a struct so that a caller enumerating the plan cannot
treat a delete as a weird kind of add.
Variants§
Set
Fields
§
options: ParseMapEverything the wire spec carried besides type and targetClass, verbatim.
That is exactly what upstream stores under _metadata.fields_options.<field>
(MongoSchemaCollection.js:262-264, :293-295): it destructures type and
targetClass off and keeps the rest, including keys it does not understand.
Delete
Trait Implementations§
Source§impl Clone for FieldChange
impl Clone for FieldChange
Source§fn clone(&self) -> FieldChange
fn clone(&self) -> FieldChange
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 FieldChange
impl RefUnwindSafe for FieldChange
impl Send for FieldChange
impl Sync for FieldChange
impl Unpin for FieldChange
impl UnsafeUnpin for FieldChange
impl UnwindSafe for FieldChange
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