Struct jrsonnet_evaluator::State
source · pub struct State(_);
Expand description
Maintains stack trace and import resolution
Implementations§
source§impl State
impl State
sourcepub fn import_resolved_str(&self, path: SourcePath) -> Result<IStr>
pub fn import_resolved_str(&self, path: SourcePath) -> Result<IStr>
Should only be called with path retrieved from [resolve_path
], may panic otherwise
sourcepub fn import_resolved_bin(&self, path: SourcePath) -> Result<IBytes>
pub fn import_resolved_bin(&self, path: SourcePath) -> Result<IBytes>
Should only be called with path retrieved from [resolve_path
], may panic otherwise
sourcepub fn import_resolved(&self, path: SourcePath) -> Result<Val>
pub fn import_resolved(&self, path: SourcePath) -> Result<Val>
Should only be called with path retrieved from [resolve_path
], may panic otherwise
sourcepub fn import_from(&self, from: &SourcePath, path: &str) -> Result<Val>
pub fn import_from(&self, from: &SourcePath, path: &str) -> Result<Val>
Has same semantics as import 'path'
called from from
file
pub fn import(&self, path: impl AsRef<Path>) -> Result<Val>
sourcepub fn create_default_context(&self, source: Source) -> Context
pub fn create_default_context(&self, source: Source) -> Context
Creates context with all passed global variables
sourcepub fn push<T>(
e: CallLocation<'_>,
frame_desc: impl FnOnce() -> String,
f: impl FnOnce() -> Result<T>
) -> Result<T>
pub fn push<T>(
e: CallLocation<'_>,
frame_desc: impl FnOnce() -> String,
f: impl FnOnce() -> Result<T>
) -> Result<T>
Executes code creating a new stack frame
source§impl State
impl State
Internals
pub fn settings(&self) -> Ref<'_, EvaluationSettings>
pub fn settings_mut(&self) -> RefMut<'_, EvaluationSettings>
source§impl State
impl State
Settings utilities