Struct cursive::utils::span::IndexedSpan [−][src]
pub struct IndexedSpan<T> {
pub content: IndexedCow,
pub attr: T,
}An indexed span with an associated attribute.
Fields
content: IndexedCow
Content of the span.
attr: T
Attribute applied to the span.
Methods
impl<T> IndexedSpan<T>[src]
impl<T> IndexedSpan<T>pub fn resolve<'a>(&'a self, source: &'a str) -> Span<'a, T> where
T: 'a, [src]
pub fn resolve<'a>(&'a self, source: &'a str) -> Span<'a, T> where
T: 'a, Resolve the span to a string slice and an attribute.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturns true if self is an empty span.
pub fn simple(content: &str, attr: T) -> Self[src]
pub fn simple(content: &str, attr: T) -> SelfReturns a single span around the entire text.
Trait Implementations
impl<T: Debug> Debug for IndexedSpan<T>[src]
impl<T: Debug> Debug for IndexedSpan<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Clone> Clone for IndexedSpan<T>[src]
impl<T: Clone> Clone for IndexedSpan<T>fn clone(&self) -> IndexedSpan<T>[src]
fn clone(&self) -> IndexedSpan<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<T: PartialEq> PartialEq for IndexedSpan<T>[src]
impl<T: PartialEq> PartialEq for IndexedSpan<T>fn eq(&self, other: &IndexedSpan<T>) -> bool[src]
fn eq(&self, other: &IndexedSpan<T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &IndexedSpan<T>) -> bool[src]
fn ne(&self, other: &IndexedSpan<T>) -> boolThis method tests for !=.
impl<T: Eq> Eq for IndexedSpan<T>[src]
impl<T: Eq> Eq for IndexedSpan<T>impl<T> AsRef<IndexedCow> for IndexedSpan<T>[src]
impl<T> AsRef<IndexedCow> for IndexedSpan<T>fn as_ref(&self) -> &IndexedCow[src]
fn as_ref(&self) -> &IndexedCowPerforms the conversion.
Auto Trait Implementations
impl<T> Send for IndexedSpan<T> where
T: Send,
impl<T> Send for IndexedSpan<T> where
T: Send, impl<T> Sync for IndexedSpan<T> where
T: Sync,
impl<T> Sync for IndexedSpan<T> where
T: Sync,