[−][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 = SpannedString<Style>>
pub fn spans(&self) -> impl DoubleEndedIterator + ExactSizeIterator
[src]
Iterates on the resolved 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 = SpannedString<Style>
The resulting type after dereferencing.
pub fn deref(&self) -> &SpannedString<Style>
[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
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> With for T
[src]
pub fn wrap_with<U, F>(self, f: F) -> U where
F: FnOnce(Self) -> U,
[src]
F: FnOnce(Self) -> U,
pub fn with<F>(self, f: F) -> Self where
F: FnOnce(&mut Self),
[src]
F: FnOnce(&mut Self),
pub fn try_with<E, F>(self, f: F) -> Result<Self, E> where
F: FnOnce(&mut Self) -> Result<(), E>,
[src]
F: FnOnce(&mut Self) -> Result<(), E>,
pub fn with_if<F>(self, condition: bool, f: F) -> Self where
F: FnOnce(&mut Self),
[src]
F: FnOnce(&mut Self),