pub type NonEmptyCowSlice<'a, T> = Cow<'a, NonEmptySlice<T>>;Available on crate features
std or alloc only.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.