Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§