Skip to main content

InfallibleRepresentationForScale

Trait InfallibleRepresentationForScale 

Source
pub trait InfallibleRepresentationForScale<S: Scale>: RepresentationForScale<S> + Sealed {
    // Required methods
    fn from_time(time: Time<S>) -> Quantity<Self::Unit>;
    fn into_time(raw: Quantity<Self::Unit>) -> Time<S>;
}
Expand description

Representation witness for scale S with context-free round-trips.

Required Methods§

Source

fn from_time(time: Time<S>) -> Quantity<Self::Unit>

Source

fn into_time(raw: Quantity<Self::Unit>) -> Time<S>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§