[−][src]Trait cursive::utils::span::SpannedText
Describes an object that appears like a SpannedStr
.
Associated Types
type S: AsRef<IndexedCow>
[src]
Type of span returned by SpannedText::spans()
.
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.
Provided methods
pub fn as_ref(&self) -> SpannedTextRef<'_, Self>
[src]
Returns a SpannedText
by reference.
Implementors
impl<'a, C> SpannedText for SpannedTextRef<'a, C> where
C: 'a + SpannedText + ?Sized,
[src]
C: 'a + SpannedText + ?Sized,
type S = <C as SpannedText>::S
pub fn source(&self) -> &str
[src]
pub fn spans(&self) -> &[<C as SpannedText>::S]
[src]
impl<'a, T> SpannedText for &'a SpannedString<T>
[src]
type S = IndexedSpan<T>
pub fn source(&self) -> &str
[src]
pub fn spans(&self) -> &[IndexedSpan<T>]
[src]
impl<'a, T> SpannedText for SpannedStr<'a, T> where
T: 'a,
[src]
T: 'a,