Trait our_string::StringComrade

source ·
pub trait StringComrade: Sealed {
    // Required methods
    fn from_slice(s: &str) -> Self;
    fn as_slice(&self) -> &str;
}
Expand description

Represents a socialist data container.

This trait has been sealed away by the People to ensure it cannot be implemented on capitalist types like Box and Vec.

Required Methods§

source

fn from_slice(s: &str) -> Self

source

fn as_slice(&self) -> &str

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl StringComrade for Rc<str>

source§

fn from_slice(s: &str) -> Self

source§

fn as_slice(&self) -> &str

source§

impl StringComrade for Arc<str>

source§

fn from_slice(s: &str) -> Self

source§

fn as_slice(&self) -> &str

source§

impl<T: Deref<Target = str> + for<'a> From<&'a str>> StringComrade for Rc<T>

source§

fn from_slice(s: &str) -> Self

source§

fn as_slice(&self) -> &str

source§

impl<T: Deref<Target = str> + for<'a> From<&'a str>> StringComrade for Arc<T>

source§

fn from_slice(s: &str) -> Self

source§

fn as_slice(&self) -> &str

Implementors§