pub enum StoreStateModel<D: CRDT + 'static> {
Opaque {
descriptor: ProjectionDescriptor,
data: PhantomData<D>,
},
Records(Arc<dyn RecordProjection<D>>),
}Expand description
Store-owned representation of cached current state.
StoreStateModel::Opaque caches the complete state in one record.
StoreStateModel::Records stores individually addressable records derived
from canonical Store deltas.
Variants§
Opaque
Safe default: one opaque serialized whole-state record.
Fields
§
descriptor: ProjectionDescriptorRecord-format identity; see ProjectionDescriptor.
§
data: PhantomData<D>Records(Arc<dyn RecordProjection<D>>)
A Store-defined cached record format derived from canonical Store deltas.
Implementations§
Source§impl<D: CRDT + 'static> StoreStateModel<D>
impl<D: CRDT + 'static> StoreStateModel<D>
pub fn opaque(name: impl Into<String>, version: u32) -> Self
pub fn descriptor(&self) -> ProjectionDescriptor
Auto Trait Implementations§
impl<D> Freeze for StoreStateModel<D>
impl<D> !RefUnwindSafe for StoreStateModel<D>
impl<D> Send for StoreStateModel<D>where
D: Send,
impl<D> Sync for StoreStateModel<D>where
D: Sync,
impl<D> Unpin for StoreStateModel<D>where
D: Unpin,
impl<D> UnsafeUnpin for StoreStateModel<D>
impl<D> !UnwindSafe for StoreStateModel<D>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more