pub struct PrettyProvider { /* private fields */ }Expand description
Represents a pretty-printable tree provider.
Implementations§
Source§impl PrettyProvider
impl PrettyProvider
Sourcepub fn text<S>(&self, text: S) -> PrettyTree
pub fn text<S>(&self, text: S) -> PrettyTree
Gets the width of the document.
Sourcepub fn custom<S>(&self, text: S, style: Rc<AnsiStyle>) -> PrettyTree
pub fn custom<S>(&self, text: S, style: Rc<AnsiStyle>) -> PrettyTree
Gets the width of the document.
Sourcepub fn keyword<S>(&self, text: S) -> PrettyTree
pub fn keyword<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn identifier<S>(&self, text: S) -> PrettyTree
pub fn identifier<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn generic<S>(&self, text: S) -> PrettyTree
pub fn generic<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn variable<S>(&self, text: S, mutable: bool) -> PrettyTree
pub fn variable<S>(&self, text: S, mutable: bool) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn argument<S>(&self, text: S, mutable: bool) -> PrettyTree
pub fn argument<S>(&self, text: S, mutable: bool) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn operator<S>(&self, text: S) -> PrettyTree
pub fn operator<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn string<S>(&self, text: S) -> PrettyTree
pub fn string<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn annotation<S>(&self, text: S) -> PrettyTree
pub fn annotation<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn number<S>(&self, text: S) -> PrettyTree
pub fn number<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn structure<S>(&self, text: S) -> PrettyTree
pub fn structure<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Sourcepub fn variant<S>(&self, text: S) -> PrettyTree
pub fn variant<S>(&self, text: S) -> PrettyTree
Allocate a document containing the given text.
Source§impl PrettyProvider
impl PrettyProvider
Sourcepub fn join<I, T1, T2>(&self, iter: I, joint: T2) -> PrettyTree
pub fn join<I, T1, T2>(&self, iter: I, joint: T2) -> PrettyTree
Allocate a document containing the given text.
§Examples
let theme = PrettyProvider::new(80);
theme.join(vec!["a", "b", "c"], ", ");Sourcepub fn join_slice<I, T>(&self, iter: &[I], joint: T) -> PrettyTreewhere
I: PrettyPrint,
T: PrettyPrint,
pub fn join_slice<I, T>(&self, iter: &[I], joint: T) -> PrettyTreewhere
I: PrettyPrint,
T: PrettyPrint,
Allocate a document containing the given text.
§Examples
let theme = PrettyProvider::new(80);
theme.join(&["a", "b", "c"], ", ");Sourcepub fn concat<I, T>(&self, iter: I) -> PrettyTreewhere
I: IntoIterator<Item = T>,
T: PrettyPrint,
pub fn concat<I, T>(&self, iter: I) -> PrettyTreewhere
I: IntoIterator<Item = T>,
T: PrettyPrint,
Allocate a document containing the given text.
§Examples
let theme = PrettyProvider::new(80);
theme.concat(vec!["1", "2", "3"]);Sourcepub fn concat_slice<T>(&self, iter: &[T]) -> PrettyTreewhere
T: PrettyPrint,
pub fn concat_slice<T>(&self, iter: &[T]) -> PrettyTreewhere
T: PrettyPrint,
Allocate a document containing the given text.
§Examples
let theme = PrettyProvider::new(80);
theme.concat_slice(&["1", "2", "3"]);