Struct cursive_core::views::TextContentRef
source · pub struct TextContentRef { /* private fields */ }
Expand description
A reference to the text content.
This can be deref’ed into a StyledString
.
This keeps the content locked. Do not store this!
Methods from Deref<Target = StyledString>§
sourcepub fn spans(
&self
) -> impl DoubleEndedIterator<Item = Span<'_, T>> + ExactSizeIterator<Item = Span<'_, T>>
pub fn spans(
&self
) -> impl DoubleEndedIterator<Item = Span<'_, T>> + ExactSizeIterator<Item = Span<'_, T>>
Iterates on the resolved spans.
sourcepub fn spans_raw(&self) -> &[IndexedSpan<T>]
pub fn spans_raw(&self) -> &[IndexedSpan<T>]
Returns a reference to the indexed spans.
Trait Implementations§
source§impl Deref for TextContentRef
impl Deref for TextContentRef
§type Target = SpannedString<Style>
type Target = SpannedString<Style>
The resulting type after dereferencing.
source§fn deref(&self) -> &StyledString
fn deref(&self) -> &StyledString
Dereferences the value.