pub struct ViewHandle<T> { /* private fields */ }Expand description
A handle to a view that provides get/watch operations.
All views return collections (Vec.first() on the result
if you need a single item from views with a take limit.
Implementations§
Source§impl<T> ViewHandle<T>
impl<T> ViewHandle<T>
Sourcepub async fn get(&self) -> Vec<T>
pub async fn get(&self) -> Vec<T>
Get all items from this view.
For views with a take limit defined in the stack, this returns
up to that many items. Use .first() on the result if you need
a single item.
Sourcepub fn watch(&self) -> WatchBuilder<T>where
T: Unpin,
pub fn watch(&self) -> WatchBuilder<T>where
T: Unpin,
Watch for updates to this view. Chain .take(n) to limit results.
Sourcepub fn watch_keys(&self, keys: &[&str]) -> WatchBuilder<T>where
T: Unpin,
pub fn watch_keys(&self, keys: &[&str]) -> WatchBuilder<T>where
T: Unpin,
Watch for updates filtered to specific keys.
Auto Trait Implementations§
impl<T> Freeze for ViewHandle<T>
impl<T> !RefUnwindSafe for ViewHandle<T>
impl<T> Send for ViewHandle<T>where
T: Send,
impl<T> Sync for ViewHandle<T>where
T: Sync,
impl<T> Unpin for ViewHandle<T>where
T: Unpin,
impl<T> !UnwindSafe for ViewHandle<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