Trait rtlola_interpreter::time::TimeRepresentation
source · pub trait TimeRepresentation: TimeMode + Default + Clone + Send + CondSerialize + CondDeserialize + 'static {
type InnerTime: Debug + Clone + Send + CondSerialize + CondDeserialize;
fn convert_from(&mut self, inner: Self::InnerTime) -> Time;
fn convert_into(&self, ts: Time) -> Self::InnerTime;
fn to_string(&self, ts: Self::InnerTime) -> String;
fn parse(s: &str) -> Result<Self::InnerTime, String>;
fn default_start_time() -> Option<SystemTime> { ... }
}Expand description
The functionality a time format has to provide.
Required Associated Types§
sourcetype InnerTime: Debug + Clone + Send + CondSerialize + CondDeserialize
type InnerTime: Debug + Clone + Send + CondSerialize + CondDeserialize
The internal representation of the time format.
Required Methods§
sourcefn convert_from(&mut self, inner: Self::InnerTime) -> Time
fn convert_from(&mut self, inner: Self::InnerTime) -> Time
Convert from the internal time representation to the monitor time.
sourcefn convert_into(&self, ts: Time) -> Self::InnerTime
fn convert_into(&self, ts: Time) -> Self::InnerTime
Convert from monitor time to the internal representation.
Provided Methods§
sourcefn default_start_time() -> Option<SystemTime>
fn default_start_time() -> Option<SystemTime>
Returns a default start time if applicable for the time representation.