Enum salvo_core::Error
source · #[non_exhaustive]pub enum Error {
Hyper(Error),
HttpParse(ParseError),
HttpStatus(StatusError),
Io(Error),
SerdeJson(Error),
InvalidUri(InvalidUri),
H3(Error),
Anyhow(Error),
Eyre(Report),
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(Error)
Std I/O error.
SerdeJson(Error)
SerdeJson error.
InvalidUri(InvalidUri)
Invalid URI error.
H3(Error)
Available on crate feature
quinn
only.H3 error.
Anyhow(Error)
Available on crate feature
anyhow
only.Anyhow error.
Eyre(Report)
Available on crate feature
eyre
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>> for Error
impl From<Box<dyn Error + Send + Sync>> for Error
source§fn from(e: BoxedError) -> Error
fn from(e: 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<InvalidUri> for Error
impl From<InvalidUri> for Error
source§fn from(e: InvalidUri) -> Error
fn from(e: InvalidUri) -> Error
Converts to this type from the input type.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(d: ParseError) -> Error
fn from(d: ParseError) -> Error
Converts to this type from the input type.
source§impl From<StatusError> for Error
impl From<StatusError> for Error
source§fn from(e: StatusError) -> Error
fn from(e: StatusError) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<P> Writer for P
impl<P> Writer for P
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
P: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
P: 'async_trait,
Write data to
Response
.