pub(crate) struct Fractional {
buf: [u8; 9],
end: u8,
}
Expand description
A formatted fractional number that can be converted to a sequence of bytes.
Fields§
§buf: [u8; 9]
§end: u8
Implementations§
Source§impl Fractional
impl Fractional
Sourcepub(crate) const fn new(
formatter: &FractionalFormatter,
value: i64,
) -> Fractional
pub(crate) const fn new( formatter: &FractionalFormatter, value: i64, ) -> Fractional
Using the given formatter, turn the value given into a fractional decimal representation using ASCII bytes.
Note that the fractional number returned may expand to an empty
slice of bytes. This occurs whenever the precision is set to 0
, or
when the precision is not set and the value is 0
. Any non-zero
explicitly set precision guarantees that the slice returned is not
empty.
This panics if the value given isn’t in the range 0..=999_999_999
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fractional
impl RefUnwindSafe for Fractional
impl Send for Fractional
impl Sync for Fractional
impl Unpin for Fractional
impl UnwindSafe for Fractional
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