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 + 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§
Source§impl Deref for TextContentRef
impl Deref for TextContentRef
Source§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.
Auto Trait Implementations§
impl Freeze for TextContentRef
impl RefUnwindSafe for TextContentRef
impl !Send for TextContentRef
impl Sync for TextContentRef
impl Unpin for TextContentRef
impl UnwindSafe for TextContentRef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more