ParagraphFormatter

Trait ParagraphFormatter 

Source
pub trait ParagraphFormatter: Write {
    // Required methods
    fn new(max_width: Option<usize>, capacity: usize) -> Self;
    fn is_empty(&self) -> bool;
    fn into_buffer(self) -> String;
}
Expand description

A formatter buffer we write paragraph text into.

Required Methods§

Source

fn new(max_width: Option<usize>, capacity: usize) -> Self

Make a new instance based on the given maximum width and buffer capacity.

Source

fn is_empty(&self) -> bool

Check if the internal buffer is empty.

Source

fn into_buffer(self) -> String

Consume Self and return the formatted buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§