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§
Borrowed(&'a NonEmptySlice<T>)
Borrowed data.
Owned(<NonEmptySlice<T> as ToOwned>::Owned)
Owned data.
Trait Implementations§
Source§impl<'a, T: Clone> From<&'a NonEmptySlice<T>> for NonEmptyCowSlice<'a, T>
impl<'a, T: Clone> From<&'a NonEmptySlice<T>> for NonEmptyCowSlice<'a, T>
Source§fn from(non_empty: &'a NonEmptySlice<T>) -> Self
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>
impl<'a, T: Clone> From<&'a NonEmptyVec<T>> for NonEmptyCowSlice<'a, T>
Source§fn from(non_empty: &'a NonEmptyVec<T>) -> Self
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>
impl<T: Clone> From<NonEmptyVec<T>> for NonEmptyCowSlice<'_, T>
Source§fn from(non_empty: NonEmptyVec<T>) -> Self
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.
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
fn eq(&self, other: &NonEmptyBoxedSlice<U>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T: PartialEq<U> + Clone, U> PartialEq<NonEmptySlice<U>> for NonEmptyCowSlice<'_, T>
Available on crate features std or alloc only.
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
fn eq(&self, other: &NonEmptySlice<U>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T: PartialEq<U> + Clone, U> PartialEq<NonEmptyVec<U>> for NonEmptyCowSlice<'_, T>
Available on crate features std or alloc only.
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
fn eq(&self, other: &NonEmptyVec<U>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T: PartialOrd + Clone> PartialOrd<Box<NonEmptySlice<T>>> for NonEmptyCowSlice<'_, T>
Available on crate features std or alloc only.
impl<T: PartialOrd + Clone> PartialOrd<Box<NonEmptySlice<T>>> for NonEmptyCowSlice<'_, T>
Available on crate features
std or alloc only.Source§impl<T: PartialOrd + Clone> PartialOrd<NonEmptySlice<T>> for NonEmptyCowSlice<'_, T>
Available on crate features std or alloc only.
impl<T: PartialOrd + Clone> PartialOrd<NonEmptySlice<T>> for NonEmptyCowSlice<'_, T>
Available on crate features
std or alloc only.Source§impl<T: PartialOrd + Clone> PartialOrd<NonEmptyVec<T>> for NonEmptyCowSlice<'_, T>
Available on crate features std or alloc only.
impl<T: PartialOrd + Clone> PartialOrd<NonEmptyVec<T>> for NonEmptyCowSlice<'_, T>
Available on crate features
std or alloc only.