Struct bat::PrettyPrinter [−][src]
pub struct PrettyPrinter<'a> { /* fields omitted */ }
Implementations
impl<'a> PrettyPrinter<'a>
[src]
impl<'a> PrettyPrinter<'a>
[src]pub fn new() -> Self
[src]
pub fn input(&mut self, input: Input<'a>) -> &mut Self
[src]
pub fn input(&mut self, input: Input<'a>) -> &mut Self
[src]Add an input which should be pretty-printed
pub fn inputs(
&mut self,
inputs: impl IntoIterator<Item = Input<'a>>
) -> &mut Self
[src]
pub fn inputs(
&mut self,
inputs: impl IntoIterator<Item = Input<'a>>
) -> &mut Self
[src]Adds multiple inputs which should be pretty-printed
pub fn input_file(&mut self, path: impl AsRef<Path>) -> &mut Self
[src]
pub fn input_file(&mut self, path: impl AsRef<Path>) -> &mut Self
[src]Add a file which should be pretty-printed
pub fn input_files<I, P>(&mut self, paths: I) -> &mut Self where
I: IntoIterator<Item = P>,
P: AsRef<Path>,
[src]
pub fn input_files<I, P>(&mut self, paths: I) -> &mut Self where
I: IntoIterator<Item = P>,
P: AsRef<Path>,
[src]Add multiple files which should be pretty-printed
pub fn input_stdin(&mut self) -> &mut Self
[src]
pub fn input_stdin(&mut self) -> &mut Self
[src]Add STDIN as an input
pub fn input_from_bytes(&mut self, content: &'a [u8]) -> &mut Self
[src]
pub fn input_from_bytes(&mut self, content: &'a [u8]) -> &mut Self
[src]Add a byte string as an input
pub fn input_from_reader<R: Read + 'a>(&mut self, reader: R) -> &mut Self
[src]
pub fn input_from_reader<R: Read + 'a>(&mut self, reader: R) -> &mut Self
[src]Add a custom reader as an input
pub fn language(&mut self, language: &'a str) -> &mut Self
[src]
pub fn language(&mut self, language: &'a str) -> &mut Self
[src]Specify the syntax file which should be used (default: auto-detect)
pub fn term_width(&mut self, width: usize) -> &mut Self
[src]
pub fn term_width(&mut self, width: usize) -> &mut Self
[src]The character width of the terminal (default: autodetect)
pub fn tab_width(&mut self, tab_width: Option<usize>) -> &mut Self
[src]
pub fn tab_width(&mut self, tab_width: Option<usize>) -> &mut Self
[src]The width of tab characters (default: None - do not turn tabs to spaces)
pub fn colored_output(&mut self, yes: bool) -> &mut Self
[src]
pub fn colored_output(&mut self, yes: bool) -> &mut Self
[src]Whether or not the output should be colorized (default: true)
pub fn true_color(&mut self, yes: bool) -> &mut Self
[src]
pub fn true_color(&mut self, yes: bool) -> &mut Self
[src]Whether or not to output 24bit colors (default: true)
pub fn line_numbers(&mut self, yes: bool) -> &mut Self
[src]
pub fn line_numbers(&mut self, yes: bool) -> &mut Self
[src]Whether to show line numbers
pub fn grid(&mut self, yes: bool) -> &mut Self
[src]
pub fn grid(&mut self, yes: bool) -> &mut Self
[src]Whether to paint a grid, separating line numbers, git changes and the code
pub fn rule(&mut self, yes: bool) -> &mut Self
[src]
pub fn rule(&mut self, yes: bool) -> &mut Self
[src]Whether to paint a horizontal rule to delimit files
pub fn vcs_modification_markers(&mut self, yes: bool) -> &mut Self
[src]
pub fn vcs_modification_markers(&mut self, yes: bool) -> &mut Self
[src]Whether to show modification markers for VCS changes. This has no effect if
the git
feature is not activated.
pub fn snip(&mut self, yes: bool) -> &mut Self
[src]
pub fn snip(&mut self, yes: bool) -> &mut Self
[src]Whether to show “snip” markers between visible line ranges (default: no)
pub fn wrapping_mode(&mut self, mode: WrappingMode) -> &mut Self
[src]
pub fn wrapping_mode(&mut self, mode: WrappingMode) -> &mut Self
[src]Text wrapping mode (default: do not wrap)
pub fn use_italics(&mut self, yes: bool) -> &mut Self
[src]
pub fn use_italics(&mut self, yes: bool) -> &mut Self
[src]Whether or not to use ANSI italics (default: off)
pub fn paging_mode(&mut self, mode: PagingMode) -> &mut Self
[src]
pub fn paging_mode(&mut self, mode: PagingMode) -> &mut Self
[src]If and how to use a pager (default: no paging)
pub fn pager(&mut self, cmd: &'a str) -> &mut Self
[src]
pub fn pager(&mut self, cmd: &'a str) -> &mut Self
[src]Specify the command to start the pager (default: use “less”)
pub fn line_ranges(&mut self, ranges: LineRanges) -> &mut Self
[src]
pub fn line_ranges(&mut self, ranges: LineRanges) -> &mut Self
[src]Specify the lines that should be printed (default: all)
pub fn highlight(&mut self, line: usize) -> &mut Self
[src]
pub fn highlight(&mut self, line: usize) -> &mut Self
[src]Specify a line that should be highlighted (default: none). This can be called multiple times to highlight more than one line. See also: highlight_range.
pub fn highlight_range(&mut self, from: usize, to: usize) -> &mut Self
[src]
pub fn highlight_range(&mut self, from: usize, to: usize) -> &mut Self
[src]Specify a range of lines that should be highlighted (default: none). This can be called multiple times to highlight more than one range of lines.
pub fn syntax_mapping(&mut self, mapping: SyntaxMapping<'a>) -> &mut Self
[src]
pub fn syntax_mapping(&mut self, mapping: SyntaxMapping<'a>) -> &mut Self
[src]Specify custom file extension / file name to syntax mappings