pub enum AddFieldOutcome {
Added,
AlreadyPresentSameType,
Conflict {
existing: FieldType,
},
}Expand description
What happened when a field type was reserved.
This replaces upstream’s error-code sniffing. enforceFieldExists calls
addFieldIfNotExists, swallows every error that is not INCORRECT_TYPE, reloads the schema
and re-validates (SchemaController.js:1184-1216), which means “another writer won the race
with the same type” and “another writer won the race with a different type” are distinguished
only by what a second read finds. Making that an enum means a caller cannot conflate them.
Variants§
Added
This caller reserved the type.
AlreadyPresentSameType
Someone else got there first, with the same type. Not an error: concurrent writers inferring the same type both succeed upstream.
Conflict
Someone else got there first with an incompatible type. The caller’s write must fail.
Trait Implementations§
Source§impl Clone for AddFieldOutcome
impl Clone for AddFieldOutcome
Source§fn clone(&self) -> AddFieldOutcome
fn clone(&self) -> AddFieldOutcome
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 moreSource§impl Debug for AddFieldOutcome
impl Debug for AddFieldOutcome
impl Eq for AddFieldOutcome
Source§impl PartialEq for AddFieldOutcome
impl PartialEq for AddFieldOutcome
impl StructuralPartialEq for AddFieldOutcome
Auto Trait Implementations§
impl Freeze for AddFieldOutcome
impl RefUnwindSafe for AddFieldOutcome
impl Send for AddFieldOutcome
impl Sync for AddFieldOutcome
impl Unpin for AddFieldOutcome
impl UnsafeUnpin for AddFieldOutcome
impl UnwindSafe for AddFieldOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.