Skip to main content

NonEmptyCowStr

Type Alias NonEmptyCowStr 

Source
pub type NonEmptyCowStr<'s> = Cow<'s, NonEmptyStr>;
Expand description

Represents non-empty clone-on-write strings, Cow<'s, 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.
Source§

impl PartialEq<Box<NonEmptyStr>> for NonEmptyCowStr<'_>

Available on crate features alloc or std only.
Source§

fn eq(&self, other: &NonEmptyBoxedStr) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<NonEmptyStr> for NonEmptyCowStr<'_>

Available on crate features alloc or std only.
Source§

fn eq(&self, other: &NonEmptyStr) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<NonEmptyString> for NonEmptyCowStr<'_>

Available on crate features alloc or std only.
Source§

fn eq(&self, other: &NonEmptyString) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd<Box<NonEmptyStr>> for NonEmptyCowStr<'_>

Available on crate features alloc or std only.
Source§

fn partial_cmp(&self, other: &NonEmptyBoxedStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<NonEmptyStr> for NonEmptyCowStr<'_>

Available on crate features alloc or std only.
Source§

fn partial_cmp(&self, other: &NonEmptyStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<NonEmptyString> for NonEmptyCowStr<'_>

Available on crate features alloc or std only.
Source§

fn partial_cmp(&self, other: &NonEmptyString) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more