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§
Sourcefn load(&self, id: &InterruptId) -> Result<Option<Interrupt>, InterruptError>
fn load(&self, id: &InterruptId) -> Result<Option<Interrupt>, InterruptError>
Loads an interrupt by id.
Sourcefn load_for_run(
&self,
thread_id: &RunId,
) -> Result<Vec<Interrupt>, InterruptError>
fn load_for_run( &self, thread_id: &RunId, ) -> Result<Vec<Interrupt>, InterruptError>
Loads all interrupts for a run.
Sourcefn delete(&self, id: &InterruptId) -> Result<(), InterruptError>
fn delete(&self, id: &InterruptId) -> Result<(), InterruptError>
Deletes an interrupt (e.g. after resolution).