[−][src]Struct tide::Error
The error type for HTTP operations.
Implementations
impl Error
[src]
pub fn new<E>(status: StatusCode, error: E) -> Error where
E: Error + Send + Sync + 'static,
[src]
E: Error + Send + Sync + 'static,
Create a new error object from any error type.
The error type must be threadsafe and 'static, so that the Error will be as well. If the error type does not provide a backtrace, a backtrace will be created here to ensure that a backtrace exists.
pub fn from_str<M>(status: StatusCode, msg: M) -> Error where
M: Display + Debug + Send + Sync + 'static,
[src]
M: Display + Debug + Send + Sync + 'static,
Create a new error object from static string.
pub fn status(&self) -> StatusCode
[src]
Get the status code associated with this error.
pub fn set_status(&mut self, status: StatusCode)
[src]
Set the status code associated with this error.
pub fn downcast<E>(self) -> Result<E, Error> where
E: Display + Debug + Send + Sync + 'static,
[src]
E: Display + Debug + Send + Sync + 'static,
Attempt to downcast the error object to a concrete type.
pub fn downcast_ref<E>(&self) -> Option<&E> where
E: Display + Debug + Send + Sync + 'static,
[src]
E: Display + Debug + Send + Sync + 'static,
Downcast this error object by reference.
pub fn downcast_mut<E>(&mut self) -> Option<&mut E> where
E: Display + Debug + Send + Sync + 'static,
[src]
E: Display + Debug + Send + Sync + 'static,
Downcast this error object by mutable reference.
Trait Implementations
impl AsMut<StatusCode> for Error
[src]
fn as_mut(&mut self) -> &mut StatusCode
[src]
impl AsRef<StatusCode> for Error
[src]
fn as_ref(&self) -> &StatusCode
[src]
impl AsRef<dyn Error + 'static + Send + Sync> for Error
[src]
impl AsRef<dyn Error + 'static> for Error
[src]
impl Debug for Error
[src]
impl Display for Error
[src]
impl<E> From<E> for Error where
E: Error + Send + Sync + 'static,
[src]
E: Error + Send + Sync + 'static,
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,