Skip to main content

StringLeaf

Trait StringLeaf 

Source
pub trait StringLeaf:
    Clone
    + Debug
    + PartialEq
    + Eq {
    // Required methods
    fn from_string(value: String) -> Self;
    fn as_str(&self) -> &str;
}

Required Methods§

Source

fn from_string(value: String) -> Self

Source

fn as_str(&self) -> &str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl StringLeaf for Box<str>

Source§

fn from_string(value: String) -> Self

Source§

fn as_str(&self) -> &str

Source§

impl StringLeaf for Rc<str>

Source§

fn from_string(value: String) -> Self

Source§

fn as_str(&self) -> &str

Source§

impl StringLeaf for String

Source§

fn from_string(value: String) -> Self

Source§

fn as_str(&self) -> &str

Implementors§