Struct cursive::utils::span::SpannedString[][src]

pub struct SpannedString<T> { /* fields omitted */ }

A string with associated spans.

Each span has an associated attribute T.

Methods

impl SpannedString<Style>
[src]

Returns a plain StyledString without any style.

You got no style, Dutch. You know that.

Creates a new StyledString using a single style for the entire text.

Appends the given plain text to self.

Appends text to self, using style.

impl SpannedString<()>
[src]

Returns a simple spanned string without any attribute.

impl<T> SpannedString<T>
[src]

Returns an empty SpannedString.

Creates a new SpannedString manually.

It is not recommended to use this directly. Instead, look for methods like Markdown::parse.

Returns a new SpannedString with a single span.

Appends the given StyledString to self.

Appends content and its corresponding spans to the end.

It is not recommended to use this directly; instead, look at the append method.

Important traits for Vec<u8>

Gives access to the parsed styled spans.

Important traits for &'a [u8]

Returns a reference to the indexed spans.

Returns a reference to the source string.

This is the non-parsed string.

Returns true if self is empty.

Trait Implementations

impl<T: Debug> Debug for SpannedString<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Clone> Clone for SpannedString<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq for SpannedString<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq> Eq for SpannedString<T>
[src]

impl<T> Default for SpannedString<T>
[src]

Returns the "default value" for a type. Read more

impl<'a, T> SpannedText for &'a SpannedString<T>
[src]

Type of span returned by SpannedText::spans().

Returns the source text.

Important traits for &'a [u8]

Returns the spans for this text.

Returns a SpannedText by reference.

impl<S, T> From<S> for SpannedString<T> where
    S: Into<String>,
    T: Default
[src]

Performs the conversion.

impl<'a, T> From<&'a SpannedString<T>> for SpannedStr<'a, T>
[src]

Performs the conversion.

Auto Trait Implementations

impl<T> Send for SpannedString<T> where
    T: Send

impl<T> Sync for SpannedString<T> where
    T: Sync