Struct cursive::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 = SpannedString<Style>>
sourcepub fn spans(&self) -> impl DoubleEndedIterator + ExactSizeIterator
pub fn spans(&self) -> impl DoubleEndedIterator + ExactSizeIterator
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
sourceimpl Deref for TextContentRef
impl Deref for TextContentRef
type Target = SpannedString<Style>
type Target = SpannedString<Style>
The resulting type after dereferencing.
sourcefn deref(&self) -> &SpannedString<Style>
fn deref(&self) -> &SpannedString<Style>
Dereferences the value.
Auto Trait Implementations
impl RefUnwindSafe for TextContentRef
impl !Send for TextContentRef
impl Sync for TextContentRef
impl Unpin for TextContentRef
impl UnwindSafe for TextContentRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more