pub trait SpannedText {
    type S: AsRef<IndexedCow>;

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

    fn as_ref(&self) -> SpannedTextRef<'_, Self> { ... }
}
Expand description

Describes an object that appears like a SpannedStr.

Required Associated Types

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

Required Methods

Returns the source text.

Returns the spans for this text.

Provided Methods

Returns a SpannedText by reference.

Implementors