pub struct InvalidationSubscriber { /* private fields */ }Expand description
Handle for subscribing to invalidation messages
This spawns a background task that listens to Redis Pub/Sub and processes invalidation messages by calling the provided handler callback.
Implementations§
Source§impl InvalidationSubscriber
impl InvalidationSubscriber
Sourcepub fn new(redis_url: &str, config: InvalidationConfig) -> Result<Self>
pub fn new(redis_url: &str, config: InvalidationConfig) -> Result<Self>
Sourcepub fn stats(&self) -> InvalidationStats
pub fn stats(&self) -> InvalidationStats
Get a snapshot of current statistics
Sourcepub fn start<F, Fut>(&self, handler: F) -> JoinHandle<()>
pub fn start<F, Fut>(&self, handler: F) -> JoinHandle<()>
Auto Trait Implementations§
impl Freeze for InvalidationSubscriber
impl RefUnwindSafe for InvalidationSubscriber
impl Send for InvalidationSubscriber
impl Sync for InvalidationSubscriber
impl Unpin for InvalidationSubscriber
impl UnwindSafe for InvalidationSubscriber
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more