Skip to main content

NonEmptyCowSlice

Type Alias NonEmptyCowSlice 

Source
pub type NonEmptyCowSlice<'a, T> = Cow<'a, NonEmptySlice<T>>;
Expand description

Represents non-empty clone-on-write slices, Cow<'a, NonEmptySlice<T>>.

Aliased Type§

pub enum NonEmptyCowSlice<'a, T> {
    Borrowed(&'a NonEmptySlice<T>),
    Owned(<NonEmptySlice<T> as ToOwned>::Owned),
}

Variants§

§1.0.0

Borrowed(&'a NonEmptySlice<T>)

Borrowed data.

§1.0.0

Owned(<NonEmptySlice<T> as ToOwned>::Owned)

Owned data.

Trait Implementations§

Source§

impl<'a, T: Clone> From<&'a NonEmptySlice<T>> for NonEmptyCowSlice<'a, T>

Source§

fn from(non_empty: &'a NonEmptySlice<T>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T: Clone> From<&'a NonEmptyVec<T>> for NonEmptyCowSlice<'a, T>

Source§

fn from(non_empty: &'a NonEmptyVec<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Clone> From<NonEmptyVec<T>> for NonEmptyCowSlice<'_, T>

Source§

fn from(non_empty: NonEmptyVec<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: PartialEq<U> + Clone, U> PartialEq<Box<NonEmptySlice<U>>> for NonEmptyCowSlice<'_, T>

Available on crate features std or alloc only.
Source§

fn eq(&self, other: &NonEmptyBoxedSlice<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialEq<U> + Clone, U> PartialEq<NonEmptySlice<U>> for NonEmptyCowSlice<'_, T>

Available on crate features std or alloc only.
Source§

fn eq(&self, other: &NonEmptySlice<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialEq<U> + Clone, U> PartialEq<NonEmptyVec<U>> for NonEmptyCowSlice<'_, T>

Available on crate features std or alloc only.
Source§

fn eq(&self, other: &NonEmptyVec<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialOrd + Clone> PartialOrd<Box<NonEmptySlice<T>>> for NonEmptyCowSlice<'_, T>

Available on crate features std or alloc only.
Source§

fn partial_cmp(&self, other: &NonEmptyBoxedSlice<T>) -> 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<T: PartialOrd + Clone> PartialOrd<NonEmptySlice<T>> for NonEmptyCowSlice<'_, T>

Available on crate features std or alloc only.
Source§

fn partial_cmp(&self, other: &NonEmptySlice<T>) -> 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<T: PartialOrd + Clone> PartialOrd<NonEmptyVec<T>> for NonEmptyCowSlice<'_, T>

Available on crate features std or alloc only.
Source§

fn partial_cmp(&self, other: &NonEmptyVec<T>) -> 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