pub struct AccountTokenStore { /* private fields */ }Implementations§
Source§impl AccountTokenStore
impl AccountTokenStore
pub fn new(store: Arc<CacheStore>) -> Self
Sourcepub fn get_or_create(&self, scope: &str) -> RovenueResult<String>
pub fn get_or_create(&self, scope: &str) -> RovenueResult<String>
Returns the stable token for the given scope (typically the subscriber’s rovenue_id or app_user_id). Generates + persists on first call; subsequent calls return the same UUID.
Sourcepub fn clear(&self) -> RovenueResult<()>
pub fn clear(&self) -> RovenueResult<()>
Drops every stored token. Called on log_out so the next identity does not reuse the previous user’s account token.
Auto Trait Implementations§
impl Freeze for AccountTokenStore
impl RefUnwindSafe for AccountTokenStore
impl Send for AccountTokenStore
impl Sync for AccountTokenStore
impl Unpin for AccountTokenStore
impl UnwindSafe for AccountTokenStore
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