Trait strymon_job::operators::RemoteTimestamp
[−]
[src]
pub trait RemoteTimestamp: Timestamp { type Remote: Serialize + DeserializeOwned; fn to_remote(&self) -> Self::Remote; fn from_remote(remote: Self::Remote) -> Self; }
A trait for Timely timestamps which can be serialized using Serde.
This is a workaround to Rust's orphan rules, allowing the conversion from
and to a Remote
type used in Strymon topics. An implementation is provided
for all timestamp types owned by Timely. It must be implemented
separately by users which have their own custom Timely timestamps.
Associated Types
type Remote: Serialize + DeserializeOwned
The Remote
type must implement the Serde traits, it can be Self
.
Required Methods
fn to_remote(&self) -> Self::Remote
Convert the local timestamp into a serializeable remote type.
fn from_remote(remote: Self::Remote) -> Self
Reconstruct the Timely timestamp from a deserialized remote type.
Implementations on Foreign Types
impl<TOuter, TInner> RemoteTimestamp for Product<TOuter, TInner> where
TOuter: RemoteTimestamp,
TInner: RemoteTimestamp,
[src]
TOuter: RemoteTimestamp,
TInner: RemoteTimestamp,