pub enum Message<D: Data> {
TimestampedData(TimestampedData<D>),
Watermark(Timestamp),
}
Expand description
Operators send messages on streams. A message can be either a Watermark
or a TimestampedData
.
Variants
TimestampedData(TimestampedData<D>)
Watermark(Timestamp)
Implementations
sourceimpl<D: Data> Message<D>
impl<D: Data> Message<D>
sourcepub fn new_message(timestamp: Timestamp, data: D) -> Message<D>
pub fn new_message(timestamp: Timestamp, data: D) -> Message<D>
Creates a new TimestampedData
message.
sourcepub fn new_watermark(timestamp: Timestamp) -> Message<D>
pub fn new_watermark(timestamp: Timestamp) -> Message<D>
Creates a new Watermark
message.
pub fn is_top_watermark(&self) -> bool
pub fn data(&self) -> Option<&D>
pub fn timestamp(&self) -> &Timestamp
Trait Implementations
sourceimpl<D: Data> Abomonation for Message<D> where
TimestampedData<D>: Abomonation,
D: Abomonation,
impl<D: Data> Abomonation for Message<D> where
TimestampedData<D>: Abomonation,
D: Abomonation,
sourceimpl<'de, D: Data> Deserialize<'de> for Message<D> where
D: Deserialize<'de>,
impl<'de, D: Data> Deserialize<'de> for Message<D> where
D: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<D> RefUnwindSafe for Message<D> where
D: RefUnwindSafe,
impl<D> Send for Message<D>
impl<D> Sync for Message<D>
impl<D> Unpin for Message<D> where
D: Unpin,
impl<D> UnwindSafe for Message<D> where
D: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more