pub struct ScriptCtx {
pub argv: Vec<String>,
pub current_file: Option<PathBuf>,
pub required: HashSet<PathBuf>,
pub tests: Vec<TestCase>,
/* private fields */
}Fields§
§argv: Vec<String>Program arguments after the script path.
e.g. for tatara-script imports.tlisp lilitu_io --all → ["lilitu_io", "--all"].
current_file: Option<PathBuf>The file currently being evaluated (if any). Used by (require)
to resolve relative paths against the caller’s directory.
required: HashSet<PathBuf>Set of canonical absolute paths already required. Prevents
re-evaluation on the second (or third, …) (require …) of the
same file — required forms define globals once.
tests: Vec<TestCase>Recorded test cases when in --test mode. Each entry is a
(name, thunk-closure) pair — the closure captures the test body
for deferred execution.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScriptCtx
impl !RefUnwindSafe for ScriptCtx
impl Send for ScriptCtx
impl Sync for ScriptCtx
impl Unpin for ScriptCtx
impl UnsafeUnpin for ScriptCtx
impl !UnwindSafe for ScriptCtx
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