Struct cursive_core::views::TextContentRef [−][src]
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[src]
impl !Send for TextContentRef[src]
impl Sync for TextContentRef[src]
impl Unpin for TextContentRef[src]
impl UnwindSafe for TextContentRef[src]
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,
pub 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.
pub 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>,