RawText

Trait RawText 

Source
pub trait RawText {
    // Required methods
    fn raw(&self) -> String;
    fn raw_ref(&self) -> &str;
}
Expand description

Support for converting a text object into a raw, unstyled string

Required Methods§

Source

fn raw(&self) -> String

Return an owned copy of the raw contents of the text object.

§Example
use stylish_stringlike::text::RawText;
let foo = String::from("foobar");
assert_eq!(foo.raw(), foo);
Source

fn raw_ref(&self) -> &str

Return a reference ot the raw contents of the text object.

§Example
use stylish_stringlike::text::RawText;
let foo = String::from("foobar");
assert_eq!(foo.raw_ref(), &foo);

Implementations on Foreign Types§

Source§

impl RawText for &str

Source§

fn raw(&self) -> String

Source§

fn raw_ref(&self) -> &str

Source§

impl RawText for String

Source§

fn raw(&self) -> String

Source§

fn raw_ref(&self) -> &str

Implementors§

Source§

impl<'a, T: Clone> RawText for Span<'a, T>

Source§

impl<T> RawText for Spans<T>