pub struct GeneratorContext {
pub defs: HashMap<String, TemplateDef>,
pub resolved: HashMap<String, Arc<str>>,
}Fields§
§defs: HashMap<String, TemplateDef>§resolved: HashMap<String, Arc<str>>Pre-serialized JSON strings for :global and ENV: placeholders.
Values are stored as JSON literals (e.g. "\"hello\"" for a string).
Implementations§
Source§impl GeneratorContext
impl GeneratorContext
pub fn new(defs: HashMap<String, TemplateDef>) -> Self
pub fn generate_def(&self, def: &TemplateDef, rng: &mut impl Rng) -> Value
Auto Trait Implementations§
impl Freeze for GeneratorContext
impl RefUnwindSafe for GeneratorContext
impl Send for GeneratorContext
impl Sync for GeneratorContext
impl Unpin for GeneratorContext
impl UnsafeUnpin for GeneratorContext
impl UnwindSafe for GeneratorContext
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