Struct lexa_framework::http::HttpResponse
source · pub struct HttpResponse<T> { /* private fields */ }
Implementations§
source§impl<T> HttpResponse<T>
impl<T> HttpResponse<T>
sourcepub fn html<R>(&self, html: impl Into<Html<R>>) -> Html<R>where
R: Into<Full<Bytes>>,
pub fn html<R>(&self, html: impl Into<Html<R>>) -> Html<R>where R: Into<Full<Bytes>>,
Rend l’HTML d’une vue.
sourcepub fn redirect_to(&self, uri: impl ToString) -> Redirectwhere
Self: Sized,
pub fn redirect_to(&self, uri: impl ToString) -> Redirectwhere Self: Sized,
Redirige le client vers une URL (Code HTTP 303).
sourcepub fn redirect_permanent(&self, uri: impl ToString) -> Redirectwhere
Self: Sized,
pub fn redirect_permanent(&self, uri: impl ToString) -> Redirectwhere Self: Sized,
Redirige le client vers une URL de manière permanente (Code HTTP 308).
sourcepub fn redirect_temporary(&self, uri: impl ToString) -> Redirectwhere
Self: Sized,
pub fn redirect_temporary(&self, uri: impl ToString) -> Redirectwhere Self: Sized,
Redirige le client vers une URL de manière temporaire (Code HTTP 307).
Auto Trait Implementations§
impl<T> RefUnwindSafe for HttpResponse<T>where T: RefUnwindSafe,
impl<T> Send for HttpResponse<T>where T: Send + Sync,
impl<T> Sync for HttpResponse<T>where T: Send + Sync,
impl<T> Unpin for HttpResponse<T>
impl<T> UnwindSafe for HttpResponse<T>where T: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more