pub struct CacheStore { /* private fields */ }Implementations§
Source§impl CacheStore
impl CacheStore
pub fn open(path: &Path) -> RovenueResult<Self>
pub fn open_in_memory() -> RovenueResult<Self>
pub fn schema_version(&self) -> RovenueResult<u32>
pub fn has_table(&self, name: &str) -> RovenueResult<bool>
Sourcepub fn with_conn<R>(
&self,
f: impl FnOnce(&Connection) -> Result<R>,
) -> RovenueResult<R>
pub fn with_conn<R>( &self, f: impl FnOnce(&Connection) -> Result<R>, ) -> RovenueResult<R>
Internal accessor used by sibling modules (identity, entitlements, etag).
Sourcepub const fn latest_schema_version() -> u32
pub const fn latest_schema_version() -> u32
Latest schema version the binary knows how to apply.
pub fn get_app_account_token( &self, scope: &str, ) -> RovenueResult<Option<String>>
pub fn put_app_account_token( &self, scope: &str, token: &str, ) -> RovenueResult<()>
Sourcepub fn clear_app_account_tokens(&self) -> RovenueResult<()>
pub fn clear_app_account_tokens(&self) -> RovenueResult<()>
Wipes every app account token. Used on log_out — tokens are bound to the previous identity scope and must not carry over to the next user.
pub fn count_app_account_tokens(&self) -> RovenueResult<i64>
pub fn append_session_event( &self, rovenue_id: &str, kind: &str, occurred_at: &str, duration_ms: Option<u32>, ) -> RovenueResult<()>
pub fn list_session_events( &self, limit: usize, ) -> RovenueResult<Vec<SessionEventRow>>
pub fn delete_session_events(&self, ids: &[i64]) -> RovenueResult<()>
Sourcepub fn append_queued_event(&self, envelope_json: &str) -> RovenueResult<()>
pub fn append_queued_event(&self, envelope_json: &str) -> RovenueResult<()>
Durable event queue (spec D4). Bounded at 100 entries — drop-oldest — so a stuck queue (e.g. permanent connectivity loss) cannot grow disk usage unboundedly.
Sourcepub fn list_queued_events(
&self,
limit: usize,
) -> RovenueResult<Vec<QueuedEventRow>>
pub fn list_queued_events( &self, limit: usize, ) -> RovenueResult<Vec<QueuedEventRow>>
Oldest-first — the drain discipline is peek -> POST -> delete-on-2xx.
pub fn delete_queued_events(&self, ids: &[i64]) -> RovenueResult<()>
pub fn append_attribute_mutation( &self, rovenue_id: &str, key: &str, value: Option<&str>, ) -> RovenueResult<()>
pub fn list_attribute_mutations( &self, limit: usize, ) -> RovenueResult<Vec<AttributeMutationRow>>
pub fn delete_attribute_mutations(&self, ids: &[i64]) -> RovenueResult<()>
Auto Trait Implementations§
impl !Freeze for CacheStore
impl RefUnwindSafe for CacheStore
impl Send for CacheStore
impl Sync for CacheStore
impl Unpin for CacheStore
impl UnwindSafe for CacheStore
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