[−][src]Struct octane::error::Error
The Error structure holds the kind of error code and the location of the custom 404 file, if given by the user and manages sending errors on internal http errors and other instances will send with blank content if no 404 file is found or will send the 404 file directly if given.
You will not have to use this manually, to send errors on your own, you
can do so by just specifying the error code and the content like
res.status(status_code).send("")
.
Implementations
impl Error
[src]
pub async fn err<S, '_>(
status_code: StatusCode,
config: &'_ OctaneConfig,
stream: S
) -> Result<(), Box<dyn Error>> where
S: AsyncRead + AsyncWrite + Unpin,
[src]
status_code: StatusCode,
config: &'_ OctaneConfig,
stream: S
) -> Result<(), Box<dyn Error>> where
S: AsyncRead + AsyncWrite + Unpin,
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<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,