prompty 2.0.0-beta.3

Prompty is an asset class and format for LLM prompts
Documentation
// <auto-generated by typra-emitter>
// Code generated by Typra emitter; DO NOT EDIT.

#![allow(
    unused_imports,
    dead_code,
    non_camel_case_types,
    unused_variables,
    clippy::all
)]

use super::super::events::checkpoint::Checkpoint;

/// Stores and retrieves resumable session checkpoints.
#[async_trait::async_trait]
pub trait CheckpointStore: Send + Sync {
    /// Persist a session checkpoint and return the stored checkpoint
    async fn save(
        &self,
        checkpoint: &Checkpoint,
    ) -> Result<Checkpoint, Box<dyn std::error::Error + Send + Sync>>;
    /// Load a checkpoint by session and checkpoint identifier
    async fn load(
        &self,
        session_id: &String,
        checkpoint_id: &String,
    ) -> Result<Option<Checkpoint>, Box<dyn std::error::Error + Send + Sync>>;
    /// List checkpoints for a session
    async fn list_checkpoints(
        &self,
        session_id: &String,
    ) -> Result<Vec<Checkpoint>, Box<dyn std::error::Error + Send + Sync>>;
}