pub struct PercentageFormatter {
pub precision: usize,
pub base_val: f64,
}Expand description
Percentage price formatter
Fields§
§precision: usizeNumber of decimal places for percentage, capped at 324 when formatting.
base_val: f64Base value for percentage calculation (100.0 = 100%)
Trait Implementations§
Source§impl Clone for PercentageFormatter
impl Clone for PercentageFormatter
Source§fn clone(&self) -> PercentageFormatter
fn clone(&self) -> PercentageFormatter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PercentageFormatter
impl Debug for PercentageFormatter
Source§impl Default for PercentageFormatter
impl Default for PercentageFormatter
Source§impl PriceFormatter for PercentageFormatter
impl PriceFormatter for PercentageFormatter
Source§fn clone_box(&self) -> Box<dyn PriceFormatter>
fn clone_box(&self) -> Box<dyn PriceFormatter>
Clone this formatter into a Box
Auto Trait Implementations§
impl Freeze for PercentageFormatter
impl RefUnwindSafe for PercentageFormatter
impl Send for PercentageFormatter
impl Sync for PercentageFormatter
impl Unpin for PercentageFormatter
impl UnsafeUnpin for PercentageFormatter
impl UnwindSafe for PercentageFormatter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more