pub struct JobStore { /* private fields */ }Implementations§
Source§impl JobStore
impl JobStore
pub fn open_default() -> Result<Self>
pub fn open(path: impl Into<PathBuf>) -> Result<Self>
pub fn path(&self) -> &Path
pub fn create_job(&self, request: CreateJob<'_>) -> Result<JobRecord>
pub fn update_job_config_snapshot( &self, job_id: &str, snapshot: &RunConfigSnapshot, ) -> Result<()>
pub fn update_job_input_snapshot( &self, job_id: &str, snapshot_path: &Path, input_sha256: &str, ) -> Result<()>
pub fn load_job_config_snapshot( &self, job_id: &str, ) -> Result<Option<RunConfigSnapshot>>
pub fn update_job_event_path(&self, job_id: &str, path: &Path) -> Result<()>
pub fn update_job_report_paths( &self, job_id: &str, json_path: &Path, markdown_path: &Path, ) -> Result<()>
pub fn update_job_output_path(&self, job_id: &str, path: &Path) -> Result<()>
pub fn insert_segments( &self, job_id: &str, segments: &[Segment], prompt_version: &str, provider: &str, model: &str, cache_namespace: &str, ) -> Result<()>
pub fn save_translation(&self, request: SaveTranslation<'_>) -> Result<()>
pub fn save_needs_review(&self, request: SaveNeedsReview<'_>) -> Result<()>
pub fn save_cached_translation( &self, request: SaveCachedTranslation<'_>, ) -> Result<()>
pub fn mark_job_complete(&self, job_id: &str) -> Result<()>
pub fn mark_job_running(&self, job_id: &str) -> Result<()>
pub fn mark_job_succeeded(&self, job_id: &str) -> Result<()>
pub fn mark_job_needs_review(&self, job_id: &str) -> Result<()>
pub fn mark_job_interrupted(&self, job_id: &str) -> Result<()>
pub fn mark_job_failed(&self, job_id: &str) -> Result<()>
pub fn mark_segment_failed( &self, job_id: &str, segment_id: &str, error: &str, ) -> Result<()>
pub fn mark_segment_failed_if_unfinished( &self, job_id: &str, segment_id: &str, error: &str, ) -> Result<()>
pub fn mark_unfinished_segments_failed( &self, job_id: &str, candidate_segment_ids: &[String], error: &str, ) -> Result<usize>
pub fn get_job(&self, job_id: &str) -> Result<Option<JobRecord>>
pub fn summary(&self, job_id: &str) -> Result<Option<JobSummary>>
pub fn retry_segments(&self, job_id: &str, scope: RetryScope) -> Result<usize>
pub fn insert_segment_flags( &self, flags: &[NewSegmentFlag<'_>], ) -> Result<usize>
pub fn mark_segments_needs_review( &self, job_id: &str, segment_ids: &[String], reason: &str, ) -> Result<usize>
pub fn segment_flag_count(&self, job_id: &str) -> Result<usize>
pub fn pending_segment_ids(&self, job_id: &str) -> Result<Vec<String>>
pub fn segment_records(&self, job_id: &str) -> Result<Vec<SegmentRecord>>
pub fn load_block_translations( &self, job_id: &str, ) -> Result<Vec<StoredBlockTranslation>>
pub fn load_terminal_segment_translations( &self, job_id: &str, ) -> Result<Vec<StoredSegmentTranslation>>
pub fn resumable_segment_ids(&self, job_id: &str) -> Result<Vec<String>>
pub fn find_cached_translation( &self, segment: &Segment, prompt_version: &str, provider: &str, model: &str, source_lang: Option<&str>, target_lang: &str, cache_namespace: &str, ) -> Result<Option<CachedTranslation>>
pub fn find_cached_translations_batch( &self, segments: &[Segment], request: CacheLookupRequest<'_>, ) -> Result<HashMap<String, CachedTranslation>>
Auto Trait Implementations§
impl !Freeze for JobStore
impl !RefUnwindSafe for JobStore
impl Send for JobStore
impl !Sync for JobStore
impl Unpin for JobStore
impl UnsafeUnpin for JobStore
impl !UnwindSafe for JobStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more