Trait trillium_redirect::RedirectConnExt

source ·
pub trait RedirectConnExt {
    // Required methods
    fn redirect(self, to: impl Into<Cow<'static, str>>) -> Self;
    fn redirect_as(
        self,
        to: impl Into<Cow<'static, str>>,
        status: RedirectStatus,
    ) -> Self;
}
Expand description

An extension trait for trillium::Conn for redirection

Required Methods§

source

fn redirect(self, to: impl Into<Cow<'static, str>>) -> Self

redirect this conn with the default redirect status

source

fn redirect_as( self, to: impl Into<Cow<'static, str>>, status: RedirectStatus, ) -> Self

redirect this conn with the provided redirect status

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl RedirectConnExt for Conn

source§

fn redirect(self, to: impl Into<Cow<'static, str>>) -> Self

source§

fn redirect_as( self, to: impl Into<Cow<'static, str>>, status: RedirectStatus, ) -> Self

Implementors§