Trait friendly::scale::PrefixFamily [−][src]
pub trait PrefixFamily { type Prefix: Prefix + 'static; fn unit_prefix() -> Self::Prefix; fn all_prefixes() -> &'static [&'static Self::Prefix]; fn autoscale(val: f64) -> (f64, Self::Prefix) { ... } }
Expand description
Trait for a collection of (related) prefixes.
Associated Types
Required methods
fn unit_prefix() -> Self::Prefix
[src]fn all_prefixes() -> &'static [&'static Self::Prefix]
[src]
fn all_prefixes() -> &'static [&'static Self::Prefix]
[src]Get all prefixes for this scheme. The prefixes must be in sorted order.