[][src]Struct octane::error::Error

pub struct Error { /* fields omitted */ }

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.