pub struct TemplatingContext {
pub chain_context: Option<ChainTemplatingContext>,
pub env_context: Option<EnvironmentTemplatingContext>,
pub virtual_clock: Option<Arc<VirtualClock>>,
}
Expand description
Combined templating context with both chain and environment variables
Fields§
§chain_context: Option<ChainTemplatingContext>
§env_context: Option<EnvironmentTemplatingContext>
§virtual_clock: Option<Arc<VirtualClock>>
Implementations§
Source§impl TemplatingContext
impl TemplatingContext
Sourcepub fn with_env(variables: HashMap<String, String>) -> Self
pub fn with_env(variables: HashMap<String, String>) -> Self
Create context with environment variables only
Sourcepub fn with_chain(chain_context: ChainTemplatingContext) -> Self
pub fn with_chain(chain_context: ChainTemplatingContext) -> Self
Create context with chain context only
Sourcepub fn with_both(
chain_context: ChainTemplatingContext,
variables: HashMap<String, String>,
) -> Self
pub fn with_both( chain_context: ChainTemplatingContext, variables: HashMap<String, String>, ) -> Self
Create context with both chain and environment contexts
Sourcepub fn with_virtual_clock(clock: Arc<VirtualClock>) -> Self
pub fn with_virtual_clock(clock: Arc<VirtualClock>) -> Self
Create context with virtual clock
Sourcepub fn with_clock(self, clock: Arc<VirtualClock>) -> Self
pub fn with_clock(self, clock: Arc<VirtualClock>) -> Self
Add virtual clock to existing context
Trait Implementations§
Source§impl Clone for TemplatingContext
impl Clone for TemplatingContext
Source§fn clone(&self) -> TemplatingContext
fn clone(&self) -> TemplatingContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TemplatingContext
impl RefUnwindSafe for TemplatingContext
impl Send for TemplatingContext
impl Sync for TemplatingContext
impl Unpin for TemplatingContext
impl UnwindSafe for TemplatingContext
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