Trait HeapStr

Source
pub trait HeapStr:
    Debug
    + Clone
    + Sealed {
    // Required methods
    fn from_str(other: &str) -> Self;
    fn from_string(other: String) -> Self;
    fn from_boxed_str(other: BoxedStr) -> Self;
    fn as_str(&self) -> &str;
}
Expand description

Abstract over different type of heap-allocated strings

Required Methods§

Source

fn from_str(other: &str) -> Self

Source

fn from_string(other: String) -> Self

Source

fn from_boxed_str(other: BoxedStr) -> 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.

Implementors§