Struct serwus::server::json_error::JsonError
source · pub struct JsonError {
pub type: JsonErrorType,
pub message: String,
pub debug: Option<String>,
pub reason: String,
pub data: Option<Value>,
/* private fields */
}Fields§
§type: JsonErrorTypeGeneric type common to all services
message: StringMessage to be displayed to the user
debug: Option<String>Error representation for tracing exact place in the code where error occurred
reason: StringDetailed reason of the error
data: Option<Value>Any additional data, needs to be used when presenting error to the user (f. ex. validation errors)
Trait Implementations§
source§impl ResponseError for JsonError
impl ResponseError for JsonError
source§fn error_response(&self) -> HttpResponse<BoxBody>
fn error_response(&self) -> HttpResponse<BoxBody>
Creates full response for error. Read more
source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more
Auto Trait Implementations§
impl RefUnwindSafe for JsonError
impl Send for JsonError
impl Sync for JsonError
impl Unpin for JsonError
impl UnwindSafe for JsonError
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read more