Trait CheapCloneStr

Source
pub trait CheapCloneStr:
    AsRef<str>
    + for<'a> From<&'a str>
    + From<String>
    + PartialEq
    + Eq
    + Clone
    + Default
    + Debug
    + 'static { }
Expand description

Trait that represents a cheaply clonable string. If you’re unsure what to use here consider Arc<str> or string_cache::Atom.

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.

Implementors§

Source§

impl<T> CheapCloneStr for T
where T: AsRef<str> + for<'a> From<&'a str> + From<String> + PartialEq + Eq + Clone + Default + Debug + 'static,