pub struct StreamElement {
pub data: Vec<u8>,
pub event_time: DateTime<Utc>,
pub processing_time: DateTime<Utc>,
pub key: Option<Vec<u8>>,
pub metadata: StreamMetadata,
}Expand description
A stream element containing data and metadata.
Fields§
§data: Vec<u8>The actual data payload
event_time: DateTime<Utc>Event timestamp
processing_time: DateTime<Utc>Processing timestamp
key: Option<Vec<u8>>Optional key for partitioning
metadata: StreamMetadataMetadata
Implementations§
Source§impl StreamElement
impl StreamElement
Sourcepub fn with_metadata(self, metadata: StreamMetadata) -> Self
pub fn with_metadata(self, metadata: StreamMetadata) -> Self
Create a new stream element with metadata.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Get the size in bytes of this element.
Trait Implementations§
Source§impl Clone for StreamElement
impl Clone for StreamElement
Source§fn clone(&self) -> StreamElement
fn clone(&self) -> StreamElement
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 Debug for StreamElement
impl Debug for StreamElement
Source§impl<'de> Deserialize<'de> for StreamElement
impl<'de> Deserialize<'de> for StreamElement
Source§fn 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 Freeze for StreamElement
impl RefUnwindSafe for StreamElement
impl Send for StreamElement
impl Sync for StreamElement
impl Unpin for StreamElement
impl UnsafeUnpin for StreamElement
impl UnwindSafe for StreamElement
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