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§

The internal representation of the time format.

Required Methods§

Convert from the internal time representation to the monitor time.

Convert from monitor time to the internal representation.

Convert the internal representation into a string.

Parse the internal representation from a string and convert it into monitor time.

Provided Methods§

Returns a default start time if applicable for the time representation.

Implementors§