Trait RawText
stylish_stringlike::text
pub trait RawText { fn raw(&self) -> String; fn raw_ref(&self) -> &str; }
Support for converting a text object into a raw, unstyled string
fn raw(&self) -> String
Return an owned copy of the raw contents of the text object.
use stylish_stringlike::text::RawText; let foo = String::from("foobar"); assert_eq!(foo.raw(), foo);
fn raw_ref(&self) -> &str
Return a reference ot the raw contents of the text object.
use stylish_stringlike::text::RawText; let foo = String::from("foobar"); assert_eq!(foo.raw_ref(), &foo);
impl RawText for String
impl RawText for &str
impl<'a, T: Clone> RawText for Span<'a, T>
impl<T> RawText for Spans<T>
fn raw_ref<'a>(&self) -> &str