pub enum Response {
    Ok,
    Redirect,
    ClientErr,
    ServerErr,
}
Expand description

Response

This enum simplifies return codes for HTTP responses

let ok = Response::Ok;
// OR
let ok = Response::from(200);

Variants

Ok

All Ok

Redirect

Link/Page has moved, redirect

ClientErr

Client error - something went wrong that was caused by the client

ServerErr

Server error - something went wrong server side

Trait Implementations

from

Convert a u32 to a response

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.