pub struct FormatSpec {
pub decimal_places: u8,
pub integer_places: u8,
}Expand description
Compiled form of an SRD-40b format: declaration. The
only field that matters at value-sanitiser time is
decimal_places; the integer-side layout is recorded for
diagnostic display but not enforced on the value.
Fields§
§decimal_places: u8Number of decimal places to round to. 0 means “round
to integer.”
integer_places: u8Number of placeholder characters before the decimal point. Layout-only; not applied to the value.
Implementations§
Trait Implementations§
Source§impl Clone for FormatSpec
impl Clone for FormatSpec
impl Copy for FormatSpec
Source§impl Debug for FormatSpec
impl Debug for FormatSpec
impl Eq for FormatSpec
Source§impl PartialEq for FormatSpec
impl PartialEq for FormatSpec
impl StructuralPartialEq for FormatSpec
Auto Trait Implementations§
impl Freeze for FormatSpec
impl RefUnwindSafe for FormatSpec
impl Send for FormatSpec
impl Sync for FormatSpec
impl Unpin for FormatSpec
impl UnsafeUnpin for FormatSpec
impl UnwindSafe for FormatSpec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.