Trait human_size::Multiple

source ·
pub trait Multiple: Sized {
    // Required methods
    fn from_any(value: f64, multiple: Any) -> SpecificSize<Self>;
    fn into_any(size: SpecificSize<Self>) -> (f64, Any);
}
Expand description

Trait to convert a SpecificSize to and from different multiples.

Required Methods§

source

fn from_any(value: f64, multiple: Any) -> SpecificSize<Self>

Create a new SpecificSize from a value and multiple, the provided value must always valid (see SpecificSize::new).

source

fn into_any(size: SpecificSize<Self>) -> (f64, Any)

The opposite of from_any, converting self into the value and the generic multiple.

Implementors§