pub struct ArraySegments<T, const SEGMENT_LENGTHS: &'static [usize]>(/* private fields */)
where
    [(); { _ }]:;

Implementations§

source§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

source

pub const SEGMENTS: usize = _

source

pub const SEGMENT_LENGTHS: [usize; { _ }] = _

source

pub const SERIALIZED_LENGTH: usize = _

source

pub const fn split_lengths(mid: usize) -> (&'static [usize], &'static [usize])

source

pub const fn new(array: [T; { _ }]) -> Self

source

pub const fn serialize_arrays(self) -> [T; { _ }]

source

pub const fn as_serialize_arrays(&self) -> &[T; { _ }]

source

pub const fn as_serialize_arrays_mut(&mut self) -> &mut [T; { _ }]

source

pub const fn as_ptr(&self) -> *const T

source

pub const fn as_mut_ptr(&mut self) -> *mut T

source

pub fn each_offset() -> [usize; { _ }]

source

pub fn each_ptr(&self) -> [*const T; { _ }]

source

pub fn each_mut_ptr(&mut self) -> [*mut T; { _ }]

source

pub fn each_slice(&self) -> [&[T]; { _ }]

source

pub fn each_slice_mut(&mut self) -> [&mut [T]; { _ }]

source

pub fn get_slice(&self, index: usize) -> Option<&[T]>

source

pub fn get_slice_mut(&mut self, index: usize) -> Option<&mut [T]>

source

pub const fn reinterpret_lengths<const S: usize, const P: &'static [usize]>( self ) -> ArraySegments<T, { P }>
where [(); { _ }]:,

source

pub const fn reinterpret_lengths_ref<const S: usize, const P: &'static [usize]>( &self ) -> &ArraySegments<T, { P }>
where [(); { _ }]:,

source

pub const fn reinterpret_lengths_mut<const S: usize, const P: &'static [usize]>( &mut self ) -> &mut ArraySegments<T, { P }>
where [(); { _ }]:,

source

pub const fn reformulate_lengths<const S: usize, const P: &'static [usize]>( self ) -> ArraySegments<T, { P }>
where [(); { _ }]:,

source

pub const fn reformulate_lengths_ref<const S: usize, const P: &'static [usize]>( &self ) -> &ArraySegments<T, { P }>
where [(); { _ }]:,

source

pub const fn reformulate_lengths_mut<const S: usize, const P: &'static [usize]>( &mut self ) -> &mut ArraySegments<T, { P }>
where [(); { _ }]:,

Trait Implementations§

source§

impl<T: Clone, const SEGMENT_LENGTHS: &'static [usize]> Clone for ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

source§

fn clone(&self) -> ArraySegments<T, SEGMENT_LENGTHS>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> Debug for ArraySegments<T, SEGMENT_LENGTHS>
where T: Debug, [(); { _ }]:,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T, const PART_LENGTHS: &'static [usize]> IntoIterator for &'a ArraySegments<T, PART_LENGTHS>
where [(); { _ }]:,

§

type Item = &'a [T]

The type of the elements being iterated over.
§

type IntoIter = <[&'a [T]; { _ }] as IntoIterator>::IntoIter

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<'a, T, const PART_LENGTHS: &'static [usize]> IntoIterator for &'a mut ArraySegments<T, PART_LENGTHS>
where [(); { _ }]:,

§

type Item = &'a mut [T]

The type of the elements being iterated over.
§

type IntoIter = <[&'a mut [T]; { _ }] as IntoIterator>::IntoIter

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: Ord, const SEGMENT_LENGTHS: &'static [usize]> Ord for ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

source§

fn cmp(&self, other: &ArraySegments<T, SEGMENT_LENGTHS>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T: PartialEq, const SEGMENT_LENGTHS: &'static [usize]> PartialEq for ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

source§

fn eq(&self, other: &ArraySegments<T, SEGMENT_LENGTHS>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd, const SEGMENT_LENGTHS: &'static [usize]> PartialOrd for ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

source§

fn partial_cmp( &self, other: &ArraySegments<T, SEGMENT_LENGTHS> ) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<T: Copy, const SEGMENT_LENGTHS: &'static [usize]> Copy for ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

source§

impl<T: Eq, const SEGMENT_LENGTHS: &'static [usize]> Eq for ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

source§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> StructuralPartialEq for ArraySegments<T, SEGMENT_LENGTHS>
where [(); { _ }]:,

Auto Trait Implementations§

§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> RefUnwindSafe for ArraySegments<T, SEGMENT_LENGTHS>
where T: RefUnwindSafe,

§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> Send for ArraySegments<T, SEGMENT_LENGTHS>
where T: Send,

§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> Sync for ArraySegments<T, SEGMENT_LENGTHS>
where T: Sync,

§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> Unpin for ArraySegments<T, SEGMENT_LENGTHS>
where T: Unpin,

§

impl<T, const SEGMENT_LENGTHS: &'static [usize]> UnwindSafe for ArraySegments<T, SEGMENT_LENGTHS>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.