Struct prettyprint::PrettyPrinter
source · pub struct PrettyPrinter { /* private fields */ }
Expand description
Builder for PrettyPrint
.
Implementations
sourceimpl PrettyPrinter
impl PrettyPrinter
sourcepub fn language<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn language<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Language for syntax highlighting
sourcepub fn show_nonprintable<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn show_nonprintable<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether or not to show/replace non-printable characters like space, tab and newline.
sourcepub fn term_width<VALUE: Into<usize>>(&mut self, value: VALUE) -> &mut Self
pub fn term_width<VALUE: Into<usize>>(&mut self, value: VALUE) -> &mut Self
The character width of the terminal
sourcepub fn tab_width<VALUE: Into<usize>>(&mut self, value: VALUE) -> &mut Self
pub fn tab_width<VALUE: Into<usize>>(&mut self, value: VALUE) -> &mut Self
The width of tab characters. Currently, a value of 0 will cause tabs to be passed through without expanding them.
sourcepub fn loop_through<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn loop_through<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether or not to simply loop through all input (cat
mode)
sourcepub fn colored_output<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn colored_output<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether or not the output should be colorized
sourcepub fn true_color<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn true_color<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether or not the output terminal supports true color
sourcepub fn header<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn header<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Print header with output file name
sourcepub fn line_numbers<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn line_numbers<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Print line numbers
sourcepub fn output_wrap<VALUE: Into<OutputWrap>>(&mut self, value: VALUE) -> &mut Self
pub fn output_wrap<VALUE: Into<OutputWrap>>(&mut self, value: VALUE) -> &mut Self
Text wrapping mode
sourcepub fn paging_mode<VALUE: Into<PagingMode>>(&mut self, value: VALUE) -> &mut Self
pub fn paging_mode<VALUE: Into<PagingMode>>(&mut self, value: VALUE) -> &mut Self
Pager or STDOUT
sourcepub fn line_ranges<VALUE: Into<LineRanges>>(&mut self, value: VALUE) -> &mut Self
pub fn line_ranges<VALUE: Into<LineRanges>>(&mut self, value: VALUE) -> &mut Self
Specifies the lines that should be printed
sourcepub fn theme<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn theme<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The syntax highlighting theme
sourcepub fn syntax_mapping<VALUE: Into<SyntaxMapping>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn syntax_mapping<VALUE: Into<SyntaxMapping>>(
&mut self,
value: VALUE
) -> &mut Self
File extension/name mappings
sourcepub fn pager<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn pager<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
Command to start the pager
sourcepub fn use_italic_text<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn use_italic_text<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether to print some characters using italics
Trait Implementations
sourceimpl Clone for PrettyPrinter
impl Clone for PrettyPrinter
sourcefn clone(&self) -> PrettyPrinter
fn clone(&self) -> PrettyPrinter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Default for PrettyPrinter
impl Default for PrettyPrinter
sourcefn default() -> PrettyPrinter
fn default() -> PrettyPrinter
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for PrettyPrinter
impl Send for PrettyPrinter
impl Sync for PrettyPrinter
impl Unpin for PrettyPrinter
impl UnwindSafe for PrettyPrinter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more