Trait stylish_stringlike::text::RawText[][src]

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

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

Required methods

fn raw(&self) -> String[src]

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);

fn raw_ref(&self) -> &str[src]

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

impl RawText for String[src]

fn raw(&self) -> String[src]

fn raw_ref(&self) -> &str[src]

impl RawText for &str[src]

fn raw(&self) -> String[src]

fn raw_ref(&self) -> &str[src]

Implementors

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

fn raw(&self) -> String[src]

fn raw_ref(&self) -> &str[src]

impl<T> RawText for Spans<T>[src]

fn raw(&self) -> String[src]

fn raw_ref<'a>(&self) -> &str[src]