pub struct TemplateContext {
pub payload: Value,
pub route: HashMap<String, String>,
pub query: HashMap<String, String>,
pub headers: HashMap<String, String>,
pub method: String,
pub path: String,
pub source_id: String,
}Expand description
Template context containing all variables available in templates
Fields§
§payload: ValueParsed payload body
route: HashMap<String, String>Path parameters extracted from route
query: HashMap<String, String>Query parameters
headers: HashMap<String, String>HTTP headers
method: StringHTTP method
path: StringRequest path
source_id: StringSource ID
Trait Implementations§
Source§impl Clone for TemplateContext
impl Clone for TemplateContext
Source§fn clone(&self) -> TemplateContext
fn clone(&self) -> TemplateContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateContext
impl Debug for TemplateContext
Auto Trait Implementations§
impl Freeze for TemplateContext
impl RefUnwindSafe for TemplateContext
impl Send for TemplateContext
impl Sync for TemplateContext
impl Unpin for TemplateContext
impl UnsafeUnpin for TemplateContext
impl UnwindSafe for TemplateContext
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