pub enum CollectionKind {
Stream {
bound: BoundKind,
order: StreamOrder,
retry: StreamRetry,
element_type: DebugType,
},
Singleton {
bound: SingletonBoundKind,
element_type: DebugType,
},
Optional {
bound: OptionalBoundKind,
element_type: DebugType,
},
KeyedStream {
bound: BoundKind,
value_order: StreamOrder,
value_retry: StreamRetry,
key_type: DebugType,
value_type: DebugType,
},
KeyedSingleton {
bound: KeyedSingletonBoundKind,
key_type: DebugType,
value_type: DebugType,
},
}Variants§
Stream
Singleton
Optional
KeyedStream
KeyedSingleton
Implementations§
Source§impl CollectionKind
impl CollectionKind
pub fn is_bounded(&self) -> bool
Sourcepub fn is_strict(&self) -> bool
pub fn is_strict(&self) -> bool
Returns whether this collection kind is already “strict” (TotalOrder + ExactlyOnce),
meaning no non-determinism needs to be observed for mut closures.
Sourcepub fn root_repr_is_tombstoned_update_feed(&self) -> bool
pub fn root_repr_is_tombstoned_update_feed(&self) -> bool
Returns whether this collection kind, when materialized at a root (non-tick, non-atomic) location, is represented as a “tombstoned update feed”: a DFIR pipe whose elements are explicit update records that can express removal, rather than plain values.
CollectionKind::OptionalwithOptionalBoundKind::Unbounded: the pipe carriesOption<T>updates, whereNoneis a tombstone recording that the optional became null. (Bounded andInitNoneoptionals never become null after having a value, so they are represented as plainTupdates.)CollectionKind::KeyedSingletonwithKeyedSingletonBoundKind::Unbounded: the pipe carries(K, Option<V>)updates, where(k, Some(v))upserts an entry and(k, None)is a tombstone recording that keykwas removed (e.g. garbage-collected byKeyedStream::reduce_watermarkwhen the watermark advances). The other keyed bound kinds never remove keys (or are bounded), so they keep plain(K, V)entries.
This representation exists because a plain update feed cannot distinguish “no update” from “became absent” (#3181). It applies only at root locations: inside a tick (or atomic region fused into a tick’s loop), presence is re-derived every firing, so absence in a firing is already meaningful and plain values are used.
Producers of tombstoned feeds must emit an explicit tombstone for every removal (see
the delta-emitting scan in the HydroNode::ReduceKeyedWatermark codegen);
consumers hold the latest state across firings by applying updates (see
DfirBuilder::batch). Generated code for keyed feeds requires K: Clone (and
V: Clone), which the pre-existing whole-map re-emission already required.
Sourcepub fn strict_kind(&self) -> CollectionKind
pub fn strict_kind(&self) -> CollectionKind
Creates a “strict” version of this kind with TotalOrder and ExactlyOnce.
Trait Implementations§
Source§impl Clone for CollectionKind
impl Clone for CollectionKind
Source§impl Debug for CollectionKind
impl Debug for CollectionKind
impl Eq for CollectionKind
Source§impl PartialEq for CollectionKind
impl PartialEq for CollectionKind
Source§impl Serialize for CollectionKind
impl Serialize for CollectionKind
impl StructuralPartialEq for CollectionKind
Auto Trait Implementations§
impl !Send for CollectionKind
impl !Sync for CollectionKind
impl Freeze for CollectionKind
impl RefUnwindSafe for CollectionKind
impl Unpin for CollectionKind
impl UnsafeUnpin for CollectionKind
impl UnwindSafe for CollectionKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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