pub struct StateStore { /* private fields */ }Implementations§
Source§impl StateStore
impl StateStore
pub fn open_default() -> Result<Self>
pub fn open(path: PathBuf) -> Result<Self>
pub fn has_upload(&self, doc_id: &str) -> Result<bool>
pub fn insert_upload( &self, doc_id: &str, content_hash: &str, source_name: &str, session_id: &str, ts_start: &str, ts_end: &str, ) -> Result<()>
pub fn upsert_source_cursor( &self, source_name: &str, cursor_json: &str, ) -> Result<()>
pub fn source_cursor(&self, source_name: &str) -> Result<Option<String>>
pub fn upsert_file_fingerprint( &self, path: &str, fingerprint: &str, ) -> Result<()>
pub fn file_fingerprint(&self, path: &str) -> Result<Option<String>>
pub fn start_run(&self, run_id: &str) -> Result<()>
pub fn finish_run(&self, stats: &RunStats) -> Result<()>
pub fn totals_by_source(&self) -> Result<Vec<(String, i64)>>
pub fn episode_totals_by_source(&self) -> Result<Vec<(String, i64)>>
pub fn reset_all(&self) -> Result<()>
pub fn reset_source(&self, source_name: &str) -> Result<()>
pub fn upsert_consent_state(&self, state: &ConsentState) -> Result<()>
pub fn consent_state(&self) -> Result<Option<ConsentState>>
pub fn upsert_episode_upload( &self, id: &str, content_hash: &str, source_tool: &str, session_id_hash: &str, r2_object_key: &str, consent_version: &str, license: &str, ) -> Result<()>
pub fn has_episode_upload(&self, id: &str) -> Result<bool>
pub fn upsert_revocation( &self, episode_id: &str, reason: Option<&str>, revoked_at: &str, push_status: &str, ) -> Result<()>
pub fn pending_revocations(&self) -> Result<Vec<RevocationRecord>>
pub fn mark_revocation_pushed(&self, episode_id: &str) -> Result<()>
pub fn all_revoked_ids(&self) -> Result<Vec<String>>
pub fn record_snapshot( &self, version: &str, train_count: usize, val_count: usize, manifest_hash: &str, ) -> Result<()>
pub fn mark_snapshot_published(&self, version: &str) -> Result<()>
Auto Trait Implementations§
impl !Freeze for StateStore
impl !RefUnwindSafe for StateStore
impl Send for StateStore
impl !Sync for StateStore
impl Unpin for StateStore
impl UnsafeUnpin for StateStore
impl !UnwindSafe for StateStore
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