pub struct TeaViewStore<S, M> { /* private fields */ }Expand description
Read-only view — snapshots only via channel subscription or RPC.
Implementations§
Source§impl<S, M> TeaViewStore<S, M>
impl<S, M> TeaViewStore<S, M>
pub fn try_with_snapshot<R>( &self, f: impl FnOnce(&S) -> R, ) -> Result<R, TeaStoreError>
pub fn with_snapshot<R>( &self, f: impl FnOnce(&S) -> R, ) -> Result<R, TeaStoreError>
pub fn try_load(&self) -> Result<Arc<S>, TeaStoreError>
pub fn load(&self) -> Result<Arc<S>, TeaStoreError>
pub fn try_state(&self) -> Result<S, TeaStoreError>
pub fn state(&self) -> Result<S, TeaStoreError>
pub fn subscribe_state(&self) -> Result<TeaStateSubscriber<S>, TeaStoreError>where
S: PartialEq,
pub fn subscribe_changes(&self) -> Result<TeaChangeSubscriber<S>, TeaStoreError>
Trait Implementations§
Auto Trait Implementations§
impl<S, M> !RefUnwindSafe for TeaViewStore<S, M>
impl<S, M> !UnwindSafe for TeaViewStore<S, M>
impl<S, M> Freeze for TeaViewStore<S, M>
impl<S, M> Send for TeaViewStore<S, M>
impl<S, M> Sync for TeaViewStore<S, M>
impl<S, M> Unpin for TeaViewStore<S, M>
impl<S, M> UnsafeUnpin for TeaViewStore<S, M>
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