[][src]Struct annotate_snippets::snippet::Slice

pub struct Slice {
    pub source: String,
    pub line_start: usize,
    pub origin: Option<String>,
    pub annotations: Vec<SourceAnnotation>,
    pub fold: bool,
}

Structure containing the slice of text to be annotated and basic information about the location of the slice.

Fields

source: Stringline_start: usizeorigin: Option<String>annotations: Vec<SourceAnnotation>fold: bool

If set explicitly to true, the snippet will fold parts of the slice that don't contain any annotations.

Trait Implementations

impl Clone for Slice[src]

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

Performs copy-assignment from source. Read more

impl Debug for Slice[src]

Auto Trait Implementations

impl Sync for Slice

impl Unpin for Slice

impl Send for Slice

impl UnwindSafe for Slice

impl RefUnwindSafe for Slice

Blanket Implementations

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> From<T> for T[src]

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]