[][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 load_syntax<VALUE: Into<Option<Vec<u8>>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Load custom syntax-highlighter

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

Load custom theme library

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]

impl Default for PrettyPrinter[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.