pub struct CustomFormatter<'a, T, const SPEC: u128> { /* private fields */ }
Available on crate feature
compile-time
only.Expand description
Wrapper for custom formatting via its Display
trait.
The format specifier is a const-generic parameter and is part of the type.
Implementations§
Source§impl<'a, T, const SPEC: u128> CustomFormatter<'a, T, SPEC>
impl<'a, T, const SPEC: u128> CustomFormatter<'a, T, SPEC>
Sourcepub fn new(value: &'a T) -> Self
pub fn new(value: &'a T) -> Self
Construct a new CustomFormatter
value
Trait Implementations§
Source§impl<'a, T: Clone, const SPEC: u128> Clone for CustomFormatter<'a, T, SPEC>
impl<'a, T: Clone, const SPEC: u128> Clone for CustomFormatter<'a, T, SPEC>
Source§fn clone(&self) -> CustomFormatter<'a, T, SPEC>
fn clone(&self) -> CustomFormatter<'a, T, SPEC>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a, T, const SPEC: u128> Freeze for CustomFormatter<'a, T, SPEC>
impl<'a, T, const SPEC: u128> RefUnwindSafe for CustomFormatter<'a, T, SPEC>where
T: RefUnwindSafe,
impl<'a, T, const SPEC: u128> Send for CustomFormatter<'a, T, SPEC>where
T: Sync,
impl<'a, T, const SPEC: u128> Sync for CustomFormatter<'a, T, SPEC>where
T: Sync,
impl<'a, T, const SPEC: u128> Unpin for CustomFormatter<'a, T, SPEC>
impl<'a, T, const SPEC: u128> UnwindSafe for CustomFormatter<'a, T, SPEC>where
T: RefUnwindSafe,
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