pub struct Redirect { /* private fields */ }Expand description
A simple http edirect
Implementations§
Trait Implementations§
Source§impl Servable for Redirect
impl Servable for Redirect
Source§fn head<'a>(
&'a self,
_ctx: &'a RenderContext,
) -> Pin<Box<dyn Future<Output = Rendered<()>> + Send + Sync + 'a>>
fn head<'a>( &'a self, _ctx: &'a RenderContext, ) -> Pin<Box<dyn Future<Output = Rendered<()>> + Send + Sync + 'a>>
Return the same response as Servable::render, but with an empty body. Read more
Source§fn render<'a>(
&'a self,
ctx: &'a RenderContext,
) -> Pin<Box<dyn Future<Output = Rendered<RenderedBody>> + Send + Sync + 'a>>
fn render<'a>( &'a self, ctx: &'a RenderContext, ) -> Pin<Box<dyn Future<Output = Rendered<RenderedBody>> + Send + Sync + 'a>>
Render this page. Must return the same metadata as Servable::head.
Consider using crate::Rendered::with_body and Servable::head to implement this fn. Read more
Auto Trait Implementations§
impl !Freeze for Redirect
impl RefUnwindSafe for Redirect
impl Send for Redirect
impl Sync for Redirect
impl Unpin for Redirect
impl UnwindSafe for Redirect
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