pub struct StreamEvent<T> {
pub timestamp: SystemTime,
pub payload: T,
pub sequence: u64,
}Expand description
A single typed event in the stream, carrying a wall-clock timestamp and a monotonically increasing sequence number.
Fields§
§timestamp: SystemTimeWall-clock time at which the event occurred.
payload: TApplication payload.
sequence: u64Sequence number, strictly increasing within a stream.
Implementations§
Source§impl<T> StreamEvent<T>
impl<T> StreamEvent<T>
Sourcepub fn new(timestamp: SystemTime, payload: T, sequence: u64) -> Self
pub fn new(timestamp: SystemTime, payload: T, sequence: u64) -> Self
Construct a new StreamEvent.
Trait Implementations§
Source§impl<T: Clone> Clone for StreamEvent<T>
impl<T: Clone> Clone for StreamEvent<T>
Source§fn clone(&self) -> StreamEvent<T>
fn clone(&self) -> StreamEvent<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 moreAuto Trait Implementations§
impl<T> Freeze for StreamEvent<T>where
T: Freeze,
impl<T> RefUnwindSafe for StreamEvent<T>where
T: RefUnwindSafe,
impl<T> Send for StreamEvent<T>where
T: Send,
impl<T> Sync for StreamEvent<T>where
T: Sync,
impl<T> Unpin for StreamEvent<T>where
T: Unpin,
impl<T> UnsafeUnpin for StreamEvent<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StreamEvent<T>where
T: 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