NonEmptyCowStr

Type Alias NonEmptyCowStr 

Source
pub type NonEmptyCowStr<'s> = Cow<'s, NonEmptyStr>;
Available on crate features std or alloc only.
Expand description

Represents non-empty clone-on-write strings, Cow<'_, NonEmptyStr>.

Aliased Type§

pub enum NonEmptyCowStr<'s> {
    Borrowed(&'s NonEmptyStr),
    Owned(NonEmptyString),
}

Variants§

§1.0.0

Borrowed(&'s NonEmptyStr)

Borrowed data.

§1.0.0

Owned(NonEmptyString)

Owned data.

Trait Implementations§

Source§

impl<'s> From<&'s NonEmptyStr> for NonEmptyCowStr<'s>

Source§

fn from(non_empty: &'s NonEmptyStr) -> Self

Converts to this type from the input type.
Source§

impl<'s> From<&'s NonEmptyString> for NonEmptyCowStr<'s>

Source§

fn from(non_empty: &'s NonEmptyString) -> Self

Converts to this type from the input type.
Source§

impl From<NonEmptyString> for NonEmptyCowStr<'_>

Source§

fn from(non_empty: NonEmptyString) -> Self

Converts to this type from the input type.