[][src]Struct prettyprint::PrettyPrinter

pub struct PrettyPrinter { /* fields omitted */ }

Builder for PrettyPrint.

Methods

impl PrettyPrinter[src]

pub fn language<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

Language for syntax highlighting

pub fn show_nonprintable<VALUE: Into<bool>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Whether or not to show/replace non-printable characters like space, tab and newline.

pub fn term_width<VALUE: Into<usize>>(&mut self, value: VALUE) -> &mut Self[src]

The character width of the terminal

pub fn tab_width<VALUE: Into<usize>>(&mut self, value: VALUE) -> &mut Self[src]

The width of tab characters. Currently, a value of 0 will cause tabs to be passed through without expanding them.

pub fn loop_through<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Whether or not to simply loop through all input (cat mode)

pub fn colored_output<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Whether or not the output should be colorized

pub fn true_color<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Whether or not the output terminal supports true color

pub fn grid<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Print grid

pub fn header<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Print header with output file name

pub fn line_numbers<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Print line numbers

pub fn output_wrap<VALUE: Into<OutputWrap>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Text wrapping mode

pub fn paging_mode<VALUE: Into<PagingMode>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Pager or STDOUT

pub fn line_ranges<VALUE: Into<LineRanges>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Specifies the lines that should be printed

pub fn theme<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

The syntax highlighting theme

pub fn syntax_mapping<VALUE: Into<SyntaxMapping>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

File extension/name mappings

pub fn pager<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self[src]

Command to start the pager

pub fn use_italic_text<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Whether to print some characters using italics

pub fn build(&self) -> Result<PrettyPrint, String>[src]

Builds a new PrettyPrint.

Errors

If a required field has not been initialized.

Trait Implementations

impl Clone for PrettyPrinter[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for PrettyPrinter[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Erased for T