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§
Sourcefn redirect(self, to: impl Into<Cow<'static, str>>) -> Self
fn redirect(self, to: impl Into<Cow<'static, str>>) -> Self
redirect this conn with the default redirect status
Sourcefn redirect_as(
self,
to: impl Into<Cow<'static, str>>,
status: RedirectStatus,
) -> Self
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.