pub struct ParseErrorInfo {
pub duplicated_field: Option<String>,
}Expand description
Out-of-band data an error carries for the server’s own use.
Nothing here is ever serialized into a response body. Upstream’s equivalent is
err.userInfo, which the error middleware never renders: it writes code and message and
nothing else (middlewares.js:617).
The point of the type is that the alternative is worse. Recovering which unique index collided
by leaving the driver’s text in message and parsing it downstream puts the database name and
the colliding value on the wire, which is the disclosure this replaces.
Fields§
§duplicated_field: Option<String>err.userInfo.duplicated_field (MongoStorageAdapter.js:584). The field whose unique
index a write collided on.
Trait Implementations§
Source§impl Clone for ParseErrorInfo
impl Clone for ParseErrorInfo
Source§fn clone(&self) -> ParseErrorInfo
fn clone(&self) -> ParseErrorInfo
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 ParseErrorInfo
impl Debug for ParseErrorInfo
Source§impl Default for ParseErrorInfo
impl Default for ParseErrorInfo
Source§fn default() -> ParseErrorInfo
fn default() -> ParseErrorInfo
Returns the “default value” for a type. Read more
impl Eq for ParseErrorInfo
Source§impl PartialEq for ParseErrorInfo
impl PartialEq for ParseErrorInfo
impl StructuralPartialEq for ParseErrorInfo
Auto Trait Implementations§
impl Freeze for ParseErrorInfo
impl RefUnwindSafe for ParseErrorInfo
impl Send for ParseErrorInfo
impl Sync for ParseErrorInfo
impl Unpin for ParseErrorInfo
impl UnsafeUnpin for ParseErrorInfo
impl UnwindSafe for ParseErrorInfo
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.