pub struct UserError {
pub code: Option<String>,
pub message: Option<String>,
pub params: Option<HashMap<String, String>>,
}Expand description
Payload for an Error::UserError, somewhat modeled on
the errors produced by the validator package. This payload implements Serialize
with the intention of allowing the user to return this object as
the response payload.
Fields§
§code: Option<String>An optional code to indicate the a user-defined error.
message: Option<String>An optional message describing the error, meant to be returned to the user.
params: Option<HashMap<String, String>>Optional additional parameters for adding additional context to the error.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserError
impl<'de> Deserialize<'de> for UserError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for UserError
Auto Trait Implementations§
impl Freeze for UserError
impl RefUnwindSafe for UserError
impl Send for UserError
impl Sync for UserError
impl Unpin for UserError
impl UnwindSafe for UserError
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