pub struct WindowState {
pub element_count: usize,
pub size_bytes: usize,
pub earliest_timestamp: Option<DateTime<Utc>>,
pub latest_timestamp: Option<DateTime<Utc>>,
pub custom: HashMap<String, Vec<u8>>,
}Expand description
State associated with a window.
Fields§
§element_count: usizeNumber of elements in the window
size_bytes: usizeTotal size in bytes
earliest_timestamp: Option<DateTime<Utc>>Earliest element timestamp
latest_timestamp: Option<DateTime<Utc>>Latest element timestamp
custom: HashMap<String, Vec<u8>>Custom state
Implementations§
Source§impl WindowState
impl WindowState
Sourcepub fn add_element(&mut self, element: &StreamElement)
pub fn add_element(&mut self, element: &StreamElement)
Update state with a new element.
Trait Implementations§
Source§impl Clone for WindowState
impl Clone for WindowState
Source§fn clone(&self) -> WindowState
fn clone(&self) -> WindowState
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 WindowState
impl Debug for WindowState
Auto Trait Implementations§
impl Freeze for WindowState
impl RefUnwindSafe for WindowState
impl Send for WindowState
impl Sync for WindowState
impl Unpin for WindowState
impl UnsafeUnpin for WindowState
impl UnwindSafe for WindowState
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