pub struct NoRender;Expand description
The engine of an application without one: Cx::render answers 500
render.no_engine, and error pages are web-net’s own.
Trait Implementations§
impl Copy for NoRender
Source§impl Render for NoRender
impl Render for NoRender
Source§type View<'a> = dyn View + 'a
type View<'a> = dyn View + 'a
What a handler hands the engine, for any lifetime of the data it
borrows:
dyn View + 'a for a dynamic engine, the application’s own
type (Page, or Page<'a>) for a typed one.Source§fn template(&self, _name: &str) -> Option<TemplateId>
fn template(&self, _name: &str) -> Option<TemplateId>
Resolves a template name. Called at build time for every template a
route names, so an unknown name stops the application from starting.
Source§fn render(
&self,
_template: TemplateId,
_view: &(dyn View + '_),
_out: &mut Output<'_>,
) -> Result<(), RenderError>
fn render( &self, _template: TemplateId, _view: &(dyn View + '_), _out: &mut Output<'_>, ) -> Result<(), RenderError>
Source§fn error_page(
&self,
page: &ErrorPage<'_>,
out: &mut Output<'_>,
) -> Result<bool, RenderError>
fn error_page( &self, page: &ErrorPage<'_>, out: &mut Output<'_>, ) -> Result<bool, RenderError>
Writes the page for a refusal or an error, from the facts web-net
shows a visitor.
Ok(false) (the default) leaves it to web-net’s
built-in page; so does an error, which is not reported further. Read moreAuto Trait Implementations§
impl Forget for NoRender
impl Freeze for NoRender
impl RefUnwindSafe for NoRender
impl Send for NoRender
impl Sync for NoRender
impl Unpin for NoRender
impl UnsafeUnpin for NoRender
impl UnwindSafe for NoRender
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