Trait base_traits::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§