pub struct Formatter { /* private fields */ }Expand description
A specialized formatter for a Value interpolated into a Part::hole.
This type supports formatting values using standard Rust flags like padding and precision.
Implementations§
Source§impl Formatter
impl Formatter
Sourcepub const fn new(
fmt: fn(Value<'_>, &mut Formatter<'_>) -> Result<(), Error>,
) -> Formatter
pub const fn new( fmt: fn(Value<'_>, &mut Formatter<'_>) -> Result<(), Error>, ) -> Formatter
Create a formatter from the given function.
It’s the responsibility of the function to actually write the value into the formatter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Formatter
impl RefUnwindSafe for Formatter
impl Send for Formatter
impl Sync for Formatter
impl Unpin for Formatter
impl UnwindSafe for Formatter
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