pub struct ScriptContext {
pub request: Option<ChainRequest>,
pub response: Option<ChainResponse>,
pub chain_context: HashMap<String, Value>,
pub variables: HashMap<String, Value>,
pub env_vars: HashMap<String, String>,
}
Expand description
Script execution context accessible to scripts
Fields§
§request: Option<ChainRequest>
Current request being executed (for pre-scripts)
response: Option<ChainResponse>
Response from the request (for post-scripts)
chain_context: HashMap<String, Value>
Chain context with stored responses and variables
variables: HashMap<String, Value>
Request-scoped variables
env_vars: HashMap<String, String>
Environment variables
Trait Implementations§
Source§impl Clone for ScriptContext
impl Clone for ScriptContext
Source§fn clone(&self) -> ScriptContext
fn clone(&self) -> ScriptContext
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 ScriptContext
impl RefUnwindSafe for ScriptContext
impl Send for ScriptContext
impl Sync for ScriptContext
impl Unpin for ScriptContext
impl UnwindSafe for ScriptContext
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