Crate serror

Source

Structs§

Error
Intermediate error type which can be converted to from any error using ?. The standard impl From<E> for Error will attach StatusCode::INTERNAL_SERVER_ERROR, so if an alternative StatusCode is desired, you should use .status_code (AddStatusCode or AddStatusCodeError) to add the status and .header ([AddHeader] or [AddHeaderError]) before using ?.
Json
Wrapper for axum::Json that converts parsing error to serror::Error
JsonError
Serror

Traits§

AddHeaders
Convenience trait to add headers to a serror::Result directly.
AddHeadersError
Convenience trait to convert any Error into serror::Error by adding headers and converting error into anyhow error.
AddStatusCode
Convenience trait to convert Result into serror::Result by adding status to the inner error, if it exists.
AddStatusCodeError
Convenience trait to convert any Error into serror::Error by adding status and converting error into anyhow error.

Functions§

deserialize_error
deserialize_serror
serialize_error
serialize_error_pretty
try_deserialize_serror
try_serialize_error
try_serialize_error_pretty

Type Aliases§

Result