pub enum OpPath {
Create,
Update,
}Expand description
Which write path an op is being decoded on.
This exists for exactly one reason: upstream produces a different error message for a
non-numeric Increment.amount depending on the path, and the message is wire-visible. Create
goes through flattenUpdateOperatorsForCreate, whose Increment arm carries a copy-pasted
'objects to add must be an array' (DatabaseController.js:326-330). Update goes through
transformUpdateOperator, which says 'incrementing must provide a number'
(MongoTransform.js:983-985). A decoder that cannot tell the two apart has to pick one and be
wrong half the time, so it is told.
Variants§
Trait Implementations§
impl Copy for OpPath
impl Eq for OpPath
impl StructuralPartialEq for OpPath
Auto Trait Implementations§
impl Freeze for OpPath
impl RefUnwindSafe for OpPath
impl Send for OpPath
impl Sync for OpPath
impl Unpin for OpPath
impl UnsafeUnpin for OpPath
impl UnwindSafe for OpPath
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.