Skip to main content

ExecutionFactJournal

Trait ExecutionFactJournal 

Source
pub trait ExecutionFactJournal: Send + Sync {
    // Required methods
    fn append(
        &self,
        fact: ExecutionFactV1,
    ) -> Result<FactAppendOutcomeV1, JournalError>;
    fn page(
        &self,
        target: &ExecutionTargetV1,
        after_sequence: Option<u64>,
        limit: usize,
    ) -> Option<ExecutionFactPageV1>;
    fn snapshot(
        &self,
        target: &ExecutionTargetV1,
    ) -> Option<ExecutionFactSnapshotV1>;

    // Provided method
    fn append_run_event(
        &self,
        frame: ExecutionFrameV1,
        record: &RunEventRecord,
    ) -> Result<FactAppendOutcomeV1, JournalError> { ... }
}

Required Methods§

Provided Methods§

Source

fn append_run_event( &self, frame: ExecutionFrameV1, record: &RunEventRecord, ) -> Result<FactAppendOutcomeV1, JournalError>

Adapt an existing Code run event into the digest-only fact contract. Implementations may override this when their durable journal has a native event encoder; the default keeps the conversion identical for every host.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§