Trait cursive_extras::SpannedStrExt
source · pub trait SpannedStrExt<T>: Clone {
// Required methods
fn char_len(&self) -> usize;
fn chars(&self) -> Chars<'_>;
fn to_spanned_string(&self) -> SpannedString<T>;
fn as_spanned_str(&self) -> SpannedStr<'_, T>;
}Expand description
Extension trait for SpannedString and SpannedStr
These methods might be useful when working with StyledStrings
Required Methods§
sourcefn chars(&self) -> Chars<'_>
fn chars(&self) -> Chars<'_>
Iterate over the characters in the source string
Disclaimer: some special characters are actually multiple characters (like accented letters)
sourcefn to_spanned_string(&self) -> SpannedString<T>
fn to_spanned_string(&self) -> SpannedString<T>
Convert the SpannedStr back to a SpannedString
sourcefn as_spanned_str(&self) -> SpannedStr<'_, T>
fn as_spanned_str(&self) -> SpannedStr<'_, T>
Creates a SpannedStr reference from a SpannedString
Object Safety§
This trait is not object safe.