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

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

Describes an object that appears like a SpannedStr.

Associated Types

type S: AsRef<IndexedCow>[src]

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

Loading content...

Required methods

pub fn source(&self) -> &str[src]

Returns the source text.

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

Returns the spans for this text.

Loading content...

Provided methods

pub fn as_ref(&self) -> SpannedTextRef<'_, Self>[src]

Returns a SpannedText by reference.

Loading content...

Implementors

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

type S = <C as SpannedText>::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...