[][src]Struct codespan_reporting::term::Config

pub struct Config {
    pub display_style: DisplayStyle,
    pub tab_width: usize,
    pub styles: Styles,
    pub chars: Chars,
}

Configures how a diagnostic is rendered.

Fields

display_style: DisplayStyle

The display style to use when rendering diagnostics. Defaults to: DisplayStyle::Rich.

tab_width: usize

Column width of tabs. Defaults to: 4.

styles: Styles

Styles to use when rendering the diagnostic.

chars: Chars

Characters to use when rendering the diagnostic.

Methods

impl Config[src]

pub fn width(&self, s: &str) -> usize[src]

Measure the width of a string, taking into account the tab width.

pub fn tab_padding(&self) -> String[src]

Get the amount of spaces we should use for printing tabs.

Trait Implementations

impl Default for Config[src]

impl Clone for Config[src]

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

Performs copy-assignment from source. Read more

impl Debug for Config[src]

Auto Trait Implementations

impl Send for Config

impl Unpin for Config

impl Sync for Config

impl UnwindSafe for Config

impl RefUnwindSafe for Config

Blanket Implementations

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.

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

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

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