Skip to main content

InterruptStore

Trait InterruptStore 

Source
pub trait InterruptStore: Send + Sync {
    // Required methods
    fn save(&self, interrupt: &Interrupt) -> Result<(), InterruptError>;
    fn load(
        &self,
        id: &InterruptId,
    ) -> Result<Option<Interrupt>, InterruptError>;
    fn load_for_run(
        &self,
        thread_id: &RunId,
    ) -> Result<Vec<Interrupt>, InterruptError>;
    fn delete(&self, id: &InterruptId) -> Result<(), InterruptError>;
}
Expand description

Store for persisting interrupts.

Required Methods§

Source

fn save(&self, interrupt: &Interrupt) -> Result<(), InterruptError>

Saves an interrupt.

Source

fn load(&self, id: &InterruptId) -> Result<Option<Interrupt>, InterruptError>

Loads an interrupt by id.

Source

fn load_for_run( &self, thread_id: &RunId, ) -> Result<Vec<Interrupt>, InterruptError>

Loads all interrupts for a run.

Source

fn delete(&self, id: &InterruptId) -> Result<(), InterruptError>

Deletes an interrupt (e.g. after resolution).

Implementors§