Trait bonsaidb::core::key::time::limited::TimeResolution[][src]

pub trait TimeResolution: Debug + Send + Sync {
    type Representation: Variable + Serialize + for<'de> Deserialize<'de> + Display + Eq + PartialEq<Self::Representation> + Ord + PartialOrd<Self::Representation> + Clone + Copy + Send + Sync + Debug + Default;

    const FORMAT_SUFFIX: &'static str;

    fn repr_to_duration(
        value: Self::Representation
    ) -> Result<SignedDuration, TimeError>;
fn duration_to_repr(
        duration: SignedDuration
    ) -> Result<Self::Representation, TimeError>; }
Expand description

A resolution of a time measurement.

Associated Types

The in-memory and serialized representation for this resolution.

Associated Constants

The label used when formatting times with this resolution.

Required methods

Implementors