[−][src]Struct cursive::views::TextContentRef
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>
pub fn spans(&self) -> impl Iterator<Item = Span<T>>
[src]
Gives access to the parsed styled spans.
pub fn spans_raw(&self) -> &[IndexedSpan<T>]
[src]
Returns a reference to the indexed spans.
pub fn source(&self) -> &str
[src]
Returns a reference to the source string.
This is the non-parsed string.
pub fn is_empty(&self) -> bool
[src]
Returns true
if self is empty.
pub fn width(&self) -> usize
[src]
Returns the width taken by this string.
This is the sum of the width of each span.
Trait Implementations
impl Deref for TextContentRef
[src]
type Target = StyledString
The resulting type after dereferencing.
fn deref(&self) -> &StyledString
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,