Skip to main content

AsStr

Trait AsStr 

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

Required Methods§

Source

fn as_str(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsStr for Path

Source§

fn as_str(&self) -> &str

Source§

impl AsStr for PathBuf

Source§

fn as_str(&self) -> &str

Source§

impl AsStr for String

Source§

fn as_str(&self) -> &str

Source§

impl AsStr for bool

Source§

fn as_str(&self) -> &str

Source§

impl AsStr for str

Source§

fn as_str(&self) -> &str

Source§

impl<T: AsStr> AsStr for &T

Source§

fn as_str(&self) -> &str

Implementors§