pub struct GlobalPlaceholderHandler;Expand description
Handles :global placeholders — non-ENV placeholders that carry the
:global suffix. Their value is generated once at startup and reused
across all requests in the run.
Trait Implementations§
Source§impl Debug for GlobalPlaceholderHandler
impl Debug for GlobalPlaceholderHandler
Source§impl PlaceholderHandler for GlobalPlaceholderHandler
impl PlaceholderHandler for GlobalPlaceholderHandler
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 GlobalPlaceholderHandler
impl RefUnwindSafe for GlobalPlaceholderHandler
impl Send for GlobalPlaceholderHandler
impl Sync for GlobalPlaceholderHandler
impl Unpin for GlobalPlaceholderHandler
impl UnsafeUnpin for GlobalPlaceholderHandler
impl UnwindSafe for GlobalPlaceholderHandler
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