NonEmptyBoxedSlice

Type Alias NonEmptyBoxedSlice 

Source
pub type NonEmptyBoxedSlice<T> = Box<NonEmptySlice<T>>;
Available on crate features std or alloc only.
Expand description

Represents non-empty boxed slices, Box<NonEmptySlice<T>>.

Aliased Type§

pub struct NonEmptyBoxedSlice<T>(/* private fields */);

Trait Implementations§

Source§

impl<T: Clone> Clone for NonEmptyBoxedSlice<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'de, T: Deserialize<'de>> Deserialize<'de> for NonEmptyBoxedSlice<T>

Available on crate feature serde only.
Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: Clone> From<&NonEmptySlice<T>> for NonEmptyBoxedSlice<T>

Source§

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

Converts to this type from the input type.
Source§

impl<T: Clone> From<&mut NonEmptySlice<T>> for NonEmptyBoxedSlice<T>

Source§

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

Converts to this type from the input type.
Source§

impl<T: Clone> From<Cow<'_, NonEmptySlice<T>>> for NonEmptyBoxedSlice<T>

Source§

fn from(non_empty: NonEmptyCowSlice<'_, T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<NonEmptyVec<T>> for NonEmptyBoxedSlice<T>

Source§

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

Converts to this type from the input type.
Source§

impl<T> FromNonEmptyIterator<T> for NonEmptyBoxedSlice<T>

Source§

fn from_non_empty_iter<I: IntoNonEmptyIterator<Item = T>>(iterable: I) -> Self

Creates Self from the provided non-empty iterator.
Source§

impl<T> IntoIterator for NonEmptyBoxedSlice<T>

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IntoNonEmptyIterator for NonEmptyBoxedSlice<T>

Source§

type IntoNonEmptyIter = NonEmptyAdapter<IntoIter<T>>

What kind of NonEmptyIterator are we turning this into?
Source§

fn into_non_empty_iter(self) -> Self::IntoNonEmptyIter

Converts self into NonEmptyIterator.
Source§

impl<T: IntoOwned> IntoOwned for NonEmptyBoxedSlice<T>

Available on crate feature ownership only.
Source§

type Owned = Box<NonEmptySlice<<T as IntoOwned>::Owned>>

The owned type produced by into_owned. Read more
Source§

fn into_owned(self) -> Self::Owned

Consumes Self and converts it into the associated Owned type.
Source§

impl<T: Clone> TryFrom<&[T]> for NonEmptyBoxedSlice<T>

Source§

type Error = EmptySlice

The type returned in the event of a conversion error.
Source§

fn try_from(slice: &[T]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: Clone> TryFrom<&mut [T]> for NonEmptyBoxedSlice<T>

Source§

type Error = EmptySlice

The type returned in the event of a conversion error.
Source§

fn try_from(slice: &mut [T]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T> TryFrom<Box<[T]>> for NonEmptyBoxedSlice<T>

Source§

type Error = EmptyBoxedSlice<T>

The type returned in the event of a conversion error.
Source§

fn try_from(boxed: Box<[T]>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T> TryFrom<Vec<T>> for NonEmptyBoxedSlice<T>

Source§

type Error = EmptyVec<T>

The type returned in the event of a conversion error.
Source§

fn try_from(vec: Vec<T>) -> Result<Self, Self::Error>

Performs the conversion.