NonEmptyCowSlice

Type Alias NonEmptyCowSlice 

Source
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§

§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.