mod measure;
mod unit_format;
mod unit_simple;
use crate::unit_creation::{Flt, MeasureSystem as MS};
pub use measure::Measure;
pub use unit_format::UnitFormat;
pub use unit_simple::UnitSimple;
pub trait MeasureSystem<'t>
where
Self: 't + Sized,
{
#[cfg(feature = "str")]
const DEBUG_UNIT: UnitFormat<'t, Self>;
}
pub trait MultiplyBy<'t, OTH: MS<'t>> {
type Output: MS<'t>;
}
pub trait DivideBy<'t, OTH: MS<'t>> {
type Output: MS<'t>;
}
pub trait UnitTrait<'t, S: MS<'t>> {
fn from(&self, val: Flt) -> Measure<'t, S>;
fn to_base(&self, val: Flt) -> Flt;
fn to_self(&self, val: Flt) -> Flt;
}
#[cfg(not(feature = "no_std"))]
#[cfg(feature = "str")]
pub trait UnitFormatTrait<'t, S: MS<'t>> {
fn as_string_abbr(&self, val: Measure<'t, S>) -> String;
fn as_string_full(&self, val: Measure<'t, S>) -> String;
}