#[non_exhaustive]pub struct TemplateContext {
pub context: Value,
pub diagnostics: Vec<Diagnostic>,
}Expand description
The context the templates receive, and what the generator said while
building it — a type an Error suppressed is missing from context.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.context: ValueThe view model as JSON: the contract a template directory is
written against (see TEMPLATE_API).
diagnostics: Vec<Diagnostic>Trait Implementations§
Source§impl Clone for TemplateContext
impl Clone for TemplateContext
Auto Trait Implementations§
impl Forget for TemplateContext
impl Freeze for TemplateContext
impl Move 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