[][src]Struct izanami_http::response::Redirect

pub struct Redirect { /* fields omitted */ }

An IntoResponse that represents a redirection response.

Methods

impl Redirect[src]

pub fn new(location: Uri, status: StatusCode) -> Self[src]

Creates a new Redirect with the provided URI and status code.

impl Redirect[src]

pub fn moved_permanently(location: Uri) -> Self[src]

Create a Redirect with the status 301 Moved Permanently.

pub fn found(location: Uri) -> Self[src]

Create a Redirect with the status 302 Found.

pub fn see_other(location: Uri) -> Self[src]

Create a Redirect with the status 303 See Other.

pub fn temporary_redirect(location: Uri) -> Self[src]

Create a Redirect with the status 307 Temporary Redirect.

pub fn permanent_redirect(location: Uri) -> Self[src]

Create a Redirect with the status 308 Permanent Redirect.

Trait Implementations

impl IntoResponse for Redirect[src]

impl Clone for Redirect[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Redirect[src]

Auto Trait Implementations

impl Send for Redirect

impl Sync for Redirect

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]