pub struct Rendering<'t> { /* private fields */ }Expand description
Template’s own renders are for no request: plain language, nothing gated shown.
Implementations§
Source§impl<'t> Rendering<'t>
impl<'t> Rendering<'t>
pub fn new(template: &'t Template) -> Self
pub fn language(self, language: Language<'t>) -> Self
pub fn gates(self, gates: &'t dyn Gates) -> Self
Sourcepub fn withheld(&self) -> Withheld<'t>
pub fn withheld(&self) -> Withheld<'t>
The data paths bound only inside parts this viewer may not see, which JSON and a client area’s envelope leave out as the page does.
Sourcepub fn client_view(&self) -> Value
pub fn client_view(&self) -> Value
What a client area’s screen is given beside its data, in this rendering’s language and for its viewer.
Sourcepub fn translate_listing_errors(&self, data: &mut Value)
pub fn translate_listing_errors(&self, data: &mut Value)
A listing’s refused filters in a client area’s data, written in this rendering’s language.
pub fn render( &self, data: &(impl Show + ?Sized), ) -> Result<String, TemplateError>
pub fn render_submitted( &self, data: &(impl Show + ?Sized), submitted: &Submitted<'_>, ) -> Result<String, TemplateError>
pub fn render_fragment( &self, data: &(impl Show + ?Sized), id: &str, ) -> Result<String, RenderError>
pub fn render_out_of_band( &self, data: &(impl Show + ?Sized), id: &str, ) -> Result<String, RenderError>
Trait Implementations§
Auto Trait Implementations§
impl<'t> !RefUnwindSafe for Rendering<'t>
impl<'t> !Send for Rendering<'t>
impl<'t> !Sync for Rendering<'t>
impl<'t> !UnwindSafe for Rendering<'t>
impl<'t> Freeze for Rendering<'t>
impl<'t> Unpin for Rendering<'t>
impl<'t> UnsafeUnpin for Rendering<'t>
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