[][src]Struct ufmt::Formatter

pub struct Formatter<'w, W: ?Sized> where
    W: uWrite
{ /* fields omitted */ }

Configuration for formatting

Methods

impl<'w, W: ?Sized> Formatter<'w, W> where
    W: uWrite
[src]

pub fn debug_list(&mut self) -> Result<DebugList<'_, 'w, W>, W::Error>[src]

Creates a DebugList builder designed to assist with creation of uDebug implementations for list-like structures.

pub fn debug_map(&mut self) -> Result<DebugMap<'_, 'w, W>, W::Error>[src]

Creates a DebugMap builder designed to assist with creation of uDebug implementations for map-like structures.

pub fn debug_set(&mut self) -> Result<DebugSet<'_, 'w, W>, W::Error>[src]

Creates a DebugSet builder designed to assist with creation of uDebug implementations for set-like structures.

pub fn debug_struct(
    &mut self,
    name: &str
) -> Result<DebugStruct<'_, 'w, W>, W::Error>
[src]

Creates a DebugStruct builder designed to assist with creation of uDebug implementations for structs.

pub fn debug_tuple(
    &mut self,
    name: &str
) -> Result<DebugTuple<'_, 'w, W>, W::Error>
[src]

Creates a DebugTuple builder designed to assist with creation of uDebug implementations for tuple structs.

impl<'w, W: ?Sized> Formatter<'w, W> where
    W: uWrite
[src]

pub fn new(writer: &'w mut W) -> Self[src]

Creates a formatter from the given writer

pub fn pretty(
    &mut self,
    f: impl FnOnce(&mut Self) -> Result<(), W::Error>
) -> Result<(), W::Error>
[src]

Execute the closure with pretty-printing enabled

pub fn write_char(&mut self, c: char) -> Result<(), W::Error>[src]

Writes a character to the underlying buffer contained within this formatter.

pub fn write_str(&mut self, s: &str) -> Result<(), W::Error>[src]

Writes a string slice to the underlying buffer contained within this formatter.

Auto Trait Implementations

impl<'w, W: ?Sized> Unpin for Formatter<'w, W>

impl<'w, W: ?Sized> Send for Formatter<'w, W> where
    W: Send

impl<'w, W: ?Sized> Sync for Formatter<'w, W> where
    W: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]