pub enum StreamMessage<T> {
Event(T),
Watermark(i64),
Barrier(CheckpointBarrier),
}Expand description
A message that flows through streaming channels.
Wraps user events with control messages (watermarks and barriers) in a single enum. Operators pattern-match on this to handle data vs. control flow.
§Generic Parameter
T is the event payload type — typically RecordBatch or a
domain-specific event struct.
Variants§
Event(T)
A user data event.
Watermark(i64)
A watermark indicating event-time progress (millis since epoch).
Barrier(CheckpointBarrier)
A checkpoint barrier for consistent snapshots.
Implementations§
Source§impl<T> StreamMessage<T>
impl<T> StreamMessage<T>
Sourcepub const fn is_barrier(&self) -> bool
pub const fn is_barrier(&self) -> bool
Returns true if this is a barrier message.
Sourcepub const fn is_watermark(&self) -> bool
pub const fn is_watermark(&self) -> bool
Returns true if this is a watermark message.
Sourcepub const fn as_barrier(&self) -> Option<&CheckpointBarrier>
pub const fn as_barrier(&self) -> Option<&CheckpointBarrier>
Extracts the barrier if this is a StreamMessage::Barrier.
Trait Implementations§
Source§impl<T: Clone> Clone for StreamMessage<T>
impl<T: Clone> Clone for StreamMessage<T>
Source§fn clone(&self) -> StreamMessage<T>
fn clone(&self) -> StreamMessage<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for StreamMessage<T>
impl<T: Debug> Debug for StreamMessage<T>
Source§impl<T: PartialEq> PartialEq for StreamMessage<T>
impl<T: PartialEq> PartialEq for StreamMessage<T>
impl<T> StructuralPartialEq for StreamMessage<T>
Auto Trait Implementations§
impl<T> Freeze for StreamMessage<T>where
T: Freeze,
impl<T> RefUnwindSafe for StreamMessage<T>where
T: RefUnwindSafe,
impl<T> Send for StreamMessage<T>where
T: Send,
impl<T> Sync for StreamMessage<T>where
T: Sync,
impl<T> Unpin for StreamMessage<T>where
T: Unpin,
impl<T> UnsafeUnpin for StreamMessage<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StreamMessage<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.