base_traits

Trait AsStr

Source
pub trait AsStr {
    // Required method
    fn as_str(&self) -> &str;
}
Expand description

Trait defining instance method as_str() : &str that allows a type to expose its contiguous character representation to client code.

Required Methods§

Source

fn as_str(&self) -> &str

Implementations on Foreign Types§

Source§

impl AsStr for &str

Source§

fn as_str(&self) -> &str

Source§

impl AsStr for str

Source§

fn as_str(&self) -> &str

Source§

impl AsStr for String

Source§

fn as_str(&self) -> &str

Source§

impl<T: AsStr + ?Sized> AsStr for Box<T>

Source§

fn as_str(&self) -> &str

Source§

impl<T: AsStr + ?Sized> AsStr for Rc<T>

Source§

fn as_str(&self) -> &str

Implementors§