Struct cqrs_es2::UserError[][src]

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

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.