Enum salvo_core::Error
source · #[non_exhaustive]
pub enum Error {
Hyper(Error),
HttpParse(ParseError),
HttpStatus(StatusError),
Io(IoError),
SerdeJson(Error),
Anyhow(Error),
Other(BoxedError),
}
Expand description
Errors that can happen inside salvo.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Hyper(Error)
Error happened in hyper.
HttpParse(ParseError)
Error happened when parse http.
HttpStatus(StatusError)
Error from http response error status.
Io(IoError)
Std I/O error.
SerdeJson(Error)
SerdeJson error.
Anyhow(Error)
Available on Unix only.
Anyhow error.
Other(BoxedError)
Custom error that does not fall under any other error kind.
Implementations§
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Box<dyn Error + Send + Sync + 'static, Global>> for Error
impl From<Box<dyn Error + Send + Sync + 'static, Global>> for Error
source§fn from(err: BoxedError) -> Error
fn from(err: BoxedError) -> Error
Converts to this type from the input type.
source§impl From<Infallible> for Error
impl From<Infallible> for Error
source§fn from(infallible: Infallible) -> Error
fn from(infallible: Infallible) -> Error
Converts to this type from the input type.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(err: ParseError) -> Error
fn from(err: ParseError) -> Error
Converts to this type from the input type.
source§impl From<StatusError> for Error
impl From<StatusError> for Error
source§fn from(err: StatusError) -> Error
fn from(err: StatusError) -> Error
Converts to this type from the input type.
source§impl Writer for Error
impl Writer for Error
source§fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write data to
Response
.