[−][src]Struct izanami_http::response::Redirect
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]
fn into_response(self) -> Response
[src]
impl Clone for Redirect
[src]
fn clone(&self) -> 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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,