Struct mz_stash::StashCollection
source · pub struct StashCollection<K, V> {
pub id: i64,
/* private fields */
}
Expand description
StashCollection
is like a differential dataflow Collection
, but the
state of the collection is durable.
A StashCollection
stores (key, value, timestamp, diff)
entries. The key
and value types are chosen by the caller; they must implement Ord
and
they must be serializable to and deserializable via serde. The timestamp and
diff types are fixed to i64
.
A StashCollection
maintains a since frontier and an upper frontier, as
described in the correctness vocabulary document.
Fields§
§id: i64
Implementations§
source§impl<K, V> StashCollection<K, V>
impl<K, V> StashCollection<K, V>
sourcepub async fn is_initialized(
&self,
tx: &Transaction<'_>
) -> Result<bool, StashError>
pub async fn is_initialized( &self, tx: &Transaction<'_> ) -> Result<bool, StashError>
Returns whether the collection is initialized, i.e. has been written to at least once. Collections that haven’t been written to at least once cannot be read.
sourcepub async fn make_batch_tx(
&self,
tx: &Transaction<'_>
) -> Result<AppendBatch, StashError>
pub async fn make_batch_tx( &self, tx: &Transaction<'_> ) -> Result<AppendBatch, StashError>
Create a new AppendBatch for this collection from its current upper.
source§impl<K, V> StashCollection<K, V>
impl<K, V> StashCollection<K, V>
sourcepub fn append_to_batch(
&self,
batch: &mut AppendBatch,
key: &K,
value: &V,
diff: Diff
)
pub fn append_to_batch( &self, batch: &mut AppendBatch, key: &K, value: &V, diff: Diff )
Append key
, value
, diff
to batch
.
Trait Implementations§
source§impl<K, V> Clone for StashCollection<K, V>
impl<K, V> Clone for StashCollection<K, V>
source§impl<K, V> From<i64> for StashCollection<K, V>
impl<K, V> From<i64> for StashCollection<K, V>
impl<K, V> Copy for StashCollection<K, V>
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for StashCollection<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for StashCollection<K, V>
impl<K, V> Sync for StashCollection<K, V>
impl<K, V> Unpin for StashCollection<K, V>
impl<K, V> UnwindSafe for StashCollection<K, V>where
K: UnwindSafe,
V: UnwindSafe,
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
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.