Skip to main content

Fmt

Struct Fmt 

Source
pub struct Fmt { /* private fields */ }
Expand description

Fmt implements Formatter.

Implementations§

Source§

impl Fmt

Source

pub fn new(cfg: FmtConfig) -> Self

Trait Implementations§

Source§

impl Formatter for Fmt

Source§

fn begin_line_folding(&mut self)

Switches the Formatter mode to “line folding”. The Formatter must be currently in “direct” mode.
Source§

fn end_line_folding(&mut self)

Switches the Formatter mode to “direct”. The Formatter must be currently in “line folding” mode.
Source§

fn push_new_boundary(&mut self)

Registers a new boundary. This pushes the boundary on top of the internal “boundary stack”.
Source§

fn write_current_boundary(&mut self)

Write the current declared boundary to the output (the one on top of the internal boundary stack). The Formatter can be either in “direct” or “line folding” mode. Read more
Source§

fn pop_boundary(&mut self)

Pop the current boundary from the top of the “boundary stack”.
Source§

fn write_bytes(&mut self, buf: &[u8])

Write bytes from buf; they cannot be used for line folding. Read more
Source§

fn write_fws_bytes(&mut self, buf: &[u8])

Write whitespace bytes from buf. In “line folding” mode, they can be used for line folding. Read more
Source§

fn write_crlf(&mut self)

Terminate the current line, writing CRLF (“\r\n”).
Source§

fn flush(self) -> Vec<u8>

Consumes the Formatter and returns the data that was printed to it.
Source§

fn write_fws(&mut self)

Write a single folding white space character.

Auto Trait Implementations§

§

impl Freeze for Fmt

§

impl RefUnwindSafe for Fmt

§

impl Send for Fmt

§

impl Sync for Fmt

§

impl Unpin for Fmt

§

impl UnsafeUnpin for Fmt

§

impl UnwindSafe for Fmt

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V