pub struct ScriptLedger { /* private fields */ }Expand description
Every script call, in the order the points made them.
A script cannot keep a record of its own: each call gets a fresh runtime with no filesystem and nothing carried over, so the only thing it can say is its return value at its own point. Whether it ran at all — and if it did not, why — is only answerable from out here.
Bounded, because a long session at a per-tool-call point would otherwise grow one forever, and the count of what was dropped is kept: a record that fell off the end and a call that never happened must not read the same.
Implementations§
Source§impl ScriptLedger
impl ScriptLedger
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn append(&self, record: ScriptRecord)
pub fn records(&self) -> Vec<ScriptRecord>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ScriptLedger
impl Forget for ScriptLedger
impl Move for ScriptLedger
impl RefUnwindSafe for ScriptLedger
impl Send for ScriptLedger
impl Sync for ScriptLedger
impl Unpin for ScriptLedger
impl UnsafeUnpin for ScriptLedger
impl UnwindSafe for ScriptLedger
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