pub struct EngineCtx<'a>(/* private fields */);Expand description
Global Context used for variable replacement in
Condition expressions.
Implementations§
Source§impl<'a> EngineCtx<'a>
impl<'a> EngineCtx<'a>
Sourcepub fn push_ctx(&mut self, ctx: impl ContextProvider + 'a) -> &mut Self
pub fn push_ctx(&mut self, ctx: impl ContextProvider + 'a) -> &mut Self
Assign new sub-context to the complete EngineCtx
Sourcepub fn with_ctx(self, ctx: impl ContextProvider + 'a) -> Self
pub fn with_ctx(self, ctx: impl ContextProvider + 'a) -> Self
Assign new sub-context when building EngineCtx
Sourcepub fn fill(&mut self, expr: &str) -> &str
pub fn fill(&mut self, expr: &str) -> &str
Return the equivalent value associated with the specified variable expression.
Sourcepub fn replace_all(&mut self, expr: &str) -> String
pub fn replace_all(&mut self, expr: &str) -> String
Replace all variables within expression with data
specified within with the EngineCtx and return
the updated string.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for EngineCtx<'a>
impl<'a> !RefUnwindSafe for EngineCtx<'a>
impl<'a> !Send for EngineCtx<'a>
impl<'a> !Sync for EngineCtx<'a>
impl<'a> Unpin for EngineCtx<'a>
impl<'a> !UnwindSafe for EngineCtx<'a>
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