ListType

Type Alias ListType 

Source
pub type ListType<'a, T> = Cow<'a, [T]>;
Expand description

A list type which changes depending on the platform.

When the alloc feature is enabled, this is Cow<'a, [T]> which can hold either borrowed or owned slice data. When alloc is disabled, this is &'a [T] which only holds borrowed slice data.

Aliased Type§

pub enum ListType<'a, T> {
    Borrowed(&'a [T]),
    Owned(<[T] as ToOwned>::Owned),
}

Variants§

§1.0.0

Borrowed(&'a [T])

Borrowed data.

§1.0.0

Owned(<[T] as ToOwned>::Owned)

Owned data.