pub struct RequestContext<'a> { /* private fields */ }Expand description
processes all commands and keeps the application state
Implementations§
Source§impl<'a> RequestContext<'a>
impl<'a> RequestContext<'a>
pub fn new(environment: &'a Environment) -> Self
pub fn environment(&self) -> &Environment
Sourcepub fn renderer(&self) -> Renderer<'_>
pub fn renderer(&self) -> Renderer<'_>
creates a new renderer based on the inner [’Environment`]
Sourcepub fn renderer_with_placeholders<'source>(
&'source self,
placeholders: &'source [Placeholder],
) -> Renderer<'source>
pub fn renderer_with_placeholders<'source>( &'source self, placeholders: &'source [Placeholder], ) -> Renderer<'source>
creates a new renderer based on the inner Environment
and the provided placeholders
Auto Trait Implementations§
impl<'a> Freeze for RequestContext<'a>
impl<'a> RefUnwindSafe for RequestContext<'a>
impl<'a> Send for RequestContext<'a>
impl<'a> Sync for RequestContext<'a>
impl<'a> Unpin for RequestContext<'a>
impl<'a> UnsafeUnpin for RequestContext<'a>
impl<'a> UnwindSafe for RequestContext<'a>
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