Struct bat::config::Config[][src]

pub struct Config<'a> {
Show fields pub language: Option<&'a str>, pub show_nonprintable: bool, pub term_width: usize, pub tab_width: usize, pub loop_through: bool, pub colored_output: bool, pub true_color: bool, pub style_components: StyleComponents, pub wrapping_mode: WrappingMode, pub paging_mode: PagingMode, pub visible_lines: VisibleLines, pub theme: String, pub syntax_mapping: SyntaxMapping<'a>, pub pager: Option<&'a str>, pub use_italic_text: bool, pub highlighted_lines: HighlightedLineRanges,
}

Fields

language: Option<&'a str>
Expand description

The explicitly configured language, if any

show_nonprintable: bool
Expand description

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

term_width: usize
Expand description

The character width of the terminal

tab_width: usize
Expand description

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

loop_through: bool
Expand description

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

colored_output: bool
Expand description

Whether or not the output should be colorized

true_color: bool
Expand description

Whether or not the output terminal supports true color

style_components: StyleComponents
Expand description

Style elements (grid, line numbers, …)

wrapping_mode: WrappingMode
Expand description

If and how text should be wrapped

paging_mode: PagingMode
Expand description

Pager or STDOUT

visible_lines: VisibleLines
Expand description

Specifies which lines should be printed

theme: String
Expand description

The syntax highlighting theme

syntax_mapping: SyntaxMapping<'a>
Expand description

File extension/name mappings

pager: Option<&'a str>
Expand description

Command to start the pager

use_italic_text: bool
Expand description

Whether or not to use ANSI italics

highlighted_lines: HighlightedLineRanges
Expand description

Ranges of lines which should be highlighted with a special background color

Trait Implementations

impl<'a> Clone for Config<'a>[src]

fn clone(&self) -> Config<'a>[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<'a> Debug for Config<'a>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a> Default for Config<'a>[src]

fn default() -> Config<'a>[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

impl<'a> RefUnwindSafe for Config<'a>

impl<'a> Send for Config<'a>

impl<'a> Sync for Config<'a>

impl<'a> Unpin for Config<'a>

impl<'a> UnwindSafe for Config<'a>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.