pub struct WatchCache<T> { /* private fields */ }Expand description
Watch cache for efficient list-then-watch
Implementations§
Source§impl<T: Clone + Send + Sync + 'static> WatchCache<T>
impl<T: Clone + Send + Sync + 'static> WatchCache<T>
Sourcepub fn new(kind: ResourceKind, registry: Arc<WatchRegistry>) -> Self
pub fn new(kind: ResourceKind, registry: Arc<WatchRegistry>) -> Self
Create new watch cache
Sourcepub fn watch(&self) -> WatchStream
pub fn watch(&self) -> WatchStream
Subscribe to changes
Auto Trait Implementations§
impl<T> !Freeze for WatchCache<T>
impl<T> !RefUnwindSafe for WatchCache<T>
impl<T> Send for WatchCache<T>where
T: Send,
impl<T> Sync for WatchCache<T>
impl<T> Unpin for WatchCache<T>where
T: Unpin,
impl<T> !UnwindSafe for WatchCache<T>
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