pub struct SIPrefix { /* private fields */ }
Implementations§
Source§impl SIPrefix
impl SIPrefix
pub const fn new( name: &'static str, symbol: &'static str, base_exponent: i8, scale_factor: f64, ) -> SIPrefix
pub const fn base_exponent(&self) -> i8
pub const fn name(&self) -> &'static str
pub const fn symbol(&self) -> &'static str
pub const fn scale_factor(&self) -> f64
pub fn format<T: ToF64>(&self, t: &T) -> String
Available on crate feature
alloc
only.pub fn format_args<T: ToF64>(&self, fmt: PrefixFormat, t: &T) -> String
Available on crate feature
alloc
only.Trait Implementations§
Source§impl Ord for SIPrefix
impl Ord for SIPrefix
Source§impl PartialOrd for SIPrefix
impl PartialOrd for SIPrefix
impl Copy for SIPrefix
impl Eq for SIPrefix
Auto Trait Implementations§
impl Freeze for SIPrefix
impl RefUnwindSafe for SIPrefix
impl Send for SIPrefix
impl Sync for SIPrefix
impl Unpin for SIPrefix
impl UnwindSafe for SIPrefix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more