pub struct EnvPlaceholderHandler;Expand description
Handles ENV: placeholders — reads named environment variables at template
parse time (fail-closed: missing vars are an error).
Trait Implementations§
Source§impl Debug for EnvPlaceholderHandler
impl Debug for EnvPlaceholderHandler
Source§impl PlaceholderHandler for EnvPlaceholderHandler
impl PlaceholderHandler for EnvPlaceholderHandler
Source§fn matches(&self, ph: &PlaceholderRef) -> bool
fn matches(&self, ph: &PlaceholderRef) -> bool
Returns
true if this handler is responsible for the given placeholder.Source§fn resolve(
&self,
body: &Value,
_ctx: &GeneratorContext,
) -> Result<HashMap<String, Arc<str>>, TemplateError>
fn resolve( &self, body: &Value, _ctx: &GeneratorContext, ) -> Result<HashMap<String, Arc<str>>, TemplateError>
Walks
body, collects all matching placeholder names, and resolves them
to pre-serialized JSON values. Called once at template parse time.Auto Trait Implementations§
impl Freeze for EnvPlaceholderHandler
impl RefUnwindSafe for EnvPlaceholderHandler
impl Send for EnvPlaceholderHandler
impl Sync for EnvPlaceholderHandler
impl Unpin for EnvPlaceholderHandler
impl UnsafeUnpin for EnvPlaceholderHandler
impl UnwindSafe for EnvPlaceholderHandler
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