Skip to main content

EventLog

Struct EventLog 

Source
pub struct EventLog { /* private fields */ }
Expand description

In-process append-only event log.

Implementations§

Source§

impl EventLog

Source

pub const fn new() -> Self

Source

pub fn append( &mut self, kind: &'static str, payload: impl Into<String>, ) -> String

Append a new event with content-addressed id.

The id is derived from the kind, the payload, and the current log length so that repeated events produce stable, distinct ids.

Source

pub fn events(&self) -> &[Event]

Source

pub fn first_of(&self, kind: &str) -> Option<&Event>

Returns the first event of the given kind, if any.

Source

pub fn last_of(&self, kind: &str) -> Option<&Event>

Returns the most recent event of the given kind, if any.

Project the log to a list of <kind>:<id> links for the user-facing evidence array. Each link points back to a distinct event.

Source

pub fn steps_block(&self) -> String

Build a Links Notation steps block listing every event in order. Used by trace serialization in crate::solver.

Source

pub fn thinking_steps(&self) -> Vec<ThinkingStep>

Project raw solver events into user-readable, ordered thinking steps.

This is the curated projection introduced for issue #488. Instead of a noisy 1:1 dump of every internal event, it keeps only the meaningful reasoning milestones, cleans each detail down to concrete content, folds the calculator’s reduction trace into one composite compute step with detailed children, de-duplicates consecutive repeats, and labels the universal-algorithm phases high so the minimum granularity surfaces only the high-level direction.

The raw, lossless trace stays available to maintainers through EventLog::steps_block and EventLog::evidence_links.

Source

pub fn thinking_steps_for_answer(&self, final_answer: &str) -> Vec<ThinkingStep>

Like EventLog::thinking_steps, but substitutes the actual composed answer for the opaque response:<route> payload of the closing deformalize step so the final reasoning step is concrete (issue #488).

Replay every in-process event into a durable link store projection.

This is additive: the original event log remains in-process, while the target store receives memory records that can be exported as .lino or reduced to doublets by the active backend.

Trait Implementations§

Source§

impl Clone for EventLog

Source§

fn clone(&self) -> EventLog

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EventLog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EventLog

Source§

fn default() -> EventLog

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more