[][src]Struct prettyprint::PrettyPrint

pub struct PrettyPrint { /* fields omitted */ }

The main pretty print object.

This gets created through a builder.

Methods

impl PrettyPrint[src]

pub fn configure(&self) -> PrettyPrinter[src]

Dynamically configure printer

pub fn file<T: Into<String>>(&self, filename: T) -> Result<(), Error>[src]

Prints a file.

pub fn string<T: Into<String>>(&self, input: T) -> Result<(), Error>[src]

Prints a string.

pub fn string_with_header<T: Into<String>>(
    &self,
    input: T,
    header: T
) -> Result<(), Error>
[src]

Prints a string with a specific header.

pub fn get_themes(&self) -> BTreeMap<String, Theme>[src]

List all available themes for syntax highlighting

Trait Implementations

impl Debug for PrettyPrint[src]

impl Default for PrettyPrint[src]

impl<'_> From<&'_ PrettyPrint> for PrettyPrinter[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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> 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.