pub struct ExposureRepo { /* private fields */ }Expand description
Append-only dedup ledger: one row per (scope, experiment, variant) that has already been reported as exposed. A variant change yields a new (experiment_id, variant_id) pair → a fresh exposure.
Implementations§
Source§impl ExposureRepo
impl ExposureRepo
pub fn new(store: Arc<CacheStore>) -> Self
pub fn is_exposed( &self, user_scope: &str, experiment_id: &str, variant_id: &str, ) -> RovenueResult<bool>
pub fn mark( &self, user_scope: &str, experiment_id: &str, variant_id: &str, exposed_at_ms: u64, ) -> RovenueResult<()>
Auto Trait Implementations§
impl Freeze for ExposureRepo
impl RefUnwindSafe for ExposureRepo
impl Send for ExposureRepo
impl Sync for ExposureRepo
impl Unpin for ExposureRepo
impl UnwindSafe for ExposureRepo
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