[][src]Struct dialect::StyledSpan

pub struct StyledSpan<'text> {
    pub text: &'text str,
    pub style: ResolvedStyle,
}

An individual fragment of styled text.

Fields

text: &'text str

the text being styled

style: ResolvedStyle

the style it has been given

Implementations

impl<'text> StyledSpan<'text>[src]

pub fn split_lines(self) -> Vec<Self>[src]

Splits the StyledSpan into a vector of StyledSpans along the lines contained in the original StyledSpan. The outputs inherit the style of the original.

Trait Implementations

impl<'text> Clone for StyledSpan<'text>[src]

impl<'text> Copy for StyledSpan<'text>[src]

impl<'text> Debug for StyledSpan<'text>[src]

Auto Trait Implementations

impl<'text> RefUnwindSafe for StyledSpan<'text>

impl<'text> Send for StyledSpan<'text>

impl<'text> Sync for StyledSpan<'text>

impl<'text> Unpin for StyledSpan<'text>

impl<'text> UnwindSafe for StyledSpan<'text>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.