ClusterRegisterArray

Struct ClusterRegisterArray 

Source
pub struct ClusterRegisterArray<T: Sized, const DIM: usize, const DIM_INCREMENT: usize> { /* private fields */ }
Expand description

An array of identical register clusters.

Implementations§

Source§

impl<T: Sized, const DIM: usize, const DIM_INCREMENT: usize> ClusterRegisterArray<T, DIM, DIM_INCREMENT>

Source

pub const fn len(&self) -> usize

Returns the number of register blocks in the cluster.

Source

pub const fn is_empty(&self) -> bool

Returns whether the cluster is empty (DIM == 0).

Source

pub fn iter(&self) -> impl ExactSizeIterator<Item = &T>

Returns an iterator over the elements of this cluster.

Source

pub const fn get(&self, index: usize) -> &T

Returns the cluster element with the specified index.

Panics if the index is out of bounds.

Source

pub const unsafe fn get_unchecked(&self, index: usize) -> &T

Returns the cluster element with the specified index.

§Safety

index must be less than DIM.

Trait Implementations§

Source§

impl<T: Sized, const DIM: usize, const DIM_INCREMENT: usize> Index<usize> for ClusterRegisterArray<T, DIM, DIM_INCREMENT>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &T

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, T: Sized, const DIM: usize, const DIM_INCREMENT: usize> IntoIterator for &'a ClusterRegisterArray<T, DIM, DIM_INCREMENT>

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = ClusterRegisterArrayIterator<'a, T, DIM, DIM_INCREMENT>

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T, const DIM: usize, const DIM_INCREMENT: usize> Freeze for ClusterRegisterArray<T, DIM, DIM_INCREMENT>

§

impl<T, const DIM: usize, const DIM_INCREMENT: usize> RefUnwindSafe for ClusterRegisterArray<T, DIM, DIM_INCREMENT>
where T: RefUnwindSafe,

§

impl<T, const DIM: usize, const DIM_INCREMENT: usize> Send for ClusterRegisterArray<T, DIM, DIM_INCREMENT>
where T: Send,

§

impl<T, const DIM: usize, const DIM_INCREMENT: usize> Sync for ClusterRegisterArray<T, DIM, DIM_INCREMENT>
where T: Sync,

§

impl<T, const DIM: usize, const DIM_INCREMENT: usize> Unpin for ClusterRegisterArray<T, DIM, DIM_INCREMENT>
where T: Unpin,

§

impl<T, const DIM: usize, const DIM_INCREMENT: usize> UnwindSafe for ClusterRegisterArray<T, DIM, DIM_INCREMENT>
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.