pub trait State:
'static
+ Send
+ Sync {
type Item: Default;
// Required methods
fn commit(&mut self, timestamp: &Timestamp);
fn last_committed_timestamp(&self) -> Timestamp;
fn at(&mut self, timestamp: &Timestamp) -> Option<&mut Self::Item>;
}Expand description
The State trait must be implemented by the state exposed to the operators by ERDOS.
Required Associated Types§
Required Methods§
Sourcefn commit(&mut self, timestamp: &Timestamp)
fn commit(&mut self, timestamp: &Timestamp)
The commit method commits the final state for a given timestamp.
Sourcefn last_committed_timestamp(&self) -> Timestamp
fn last_committed_timestamp(&self) -> Timestamp
Retrieves the last committed timestamp by this state.
This method can be used in conjunction with Self::at to retrieve the latest committed state.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".