[][src]Trait cursive::utils::span::SpannedText

pub trait SpannedText {
    type S: AsRef<IndexedCow>;
    fn source(&self) -> &str;
fn spans(&self) -> &[Self::S]; fn as_ref(&self) -> SpannedTextRef<Self> { ... } }

Describes an object that appears like a SpannedStr.

Associated Types

type S: AsRef<IndexedCow>

Type of span returned by SpannedText::spans().

Loading content...

Required methods

fn source(&self) -> &str

Returns the source text.

fn spans(&self) -> &[Self::S]

Returns the spans for this text.

Loading content...

Provided methods

fn as_ref(&self) -> SpannedTextRef<Self>

Returns a SpannedText by reference.

Loading content...

Implementors

impl<'a, C: ?Sized> SpannedText for SpannedTextRef<'a, C> where
    C: 'a + SpannedText
[src]

type S = C::S

impl<'a, T> SpannedText for &'a SpannedString<T>[src]

type S = IndexedSpan<T>

impl<'a, T> SpannedText for SpannedStr<'a, T> where
    T: 'a, 
[src]

type S = IndexedSpan<T>

Loading content...