pub struct Const<const D: usize>(pub [usize; D]);
Tuple Fields§
§0: [usize; D]
Trait Implementations§
Source§impl<__AsMutT, const D: usize> AsMut<__AsMutT> for Const<D>
impl<__AsMutT, const D: usize> AsMut<__AsMutT> for Const<D>
Source§fn as_mut(&mut self) -> &mut __AsMutT
fn as_mut(&mut self) -> &mut __AsMutT
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<I> Indexer<Const<1>> for Iwhere
I: IndexValue,
impl<I> Indexer<Const<1>> for Iwhere
I: IndexValue,
Source§impl<A, B> Indexer<Const<2>> for (A, B)where
A: IndexValue,
B: IndexValue,
impl<A, B> Indexer<Const<2>> for (A, B)where
A: IndexValue,
B: IndexValue,
Source§impl<A, B, C, D> Indexer<Const<4>> for (A, B, C, D)
impl<A, B, C, D> Indexer<Const<4>> for (A, B, C, D)
Source§impl<A, B, C, D, E> Indexer<Const<5>> for (A, B, C, D, E)
impl<A, B, C, D, E> Indexer<Const<5>> for (A, B, C, D, E)
Source§impl<A, B, C, D, E, F> Indexer<Const<6>> for (A, B, C, D, E, F)
impl<A, B, C, D, E, F> Indexer<Const<6>> for (A, B, C, D, E, F)
Source§impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime Const<D>
impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime Const<D>
Source§impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime mut Const<D>
impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime mut Const<D>
Source§impl<const D: usize> IntoIterator for Const<D>
impl<const D: usize> IntoIterator for Const<D>
Source§impl RemoveAxis for Const<1>
impl RemoveAxis for Const<1>
Source§impl RemoveAxis for Const<2>
impl RemoveAxis for Const<2>
Source§impl RemoveAxis for Const<3>
impl RemoveAxis for Const<3>
Source§impl RemoveAxis for Const<4>
impl RemoveAxis for Const<4>
Source§impl RemoveAxis for Const<5>
impl RemoveAxis for Const<5>
Source§impl RemoveAxis for Const<6>
impl RemoveAxis for Const<6>
Source§impl Shape for Const<0>
impl Shape for Const<0>
const NDIM: Option<usize>
type Smaller = Const<0>
type Larger = Const<ella_common::::shape::{impl#41}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<0>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
Source§impl Shape for Const<1>
impl Shape for Const<1>
const NDIM: Option<usize>
type Smaller = Const<ella_common::::shape::{impl#44}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#44}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<1>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
Source§impl Shape for Const<2>
impl Shape for Const<2>
const NDIM: Option<usize>
type Smaller = Const<ella_common::::shape::{impl#47}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#47}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<2>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
Source§impl Shape for Const<3>
impl Shape for Const<3>
const NDIM: Option<usize>
type Smaller = Const<ella_common::::shape::{impl#50}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#50}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<3>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
Source§impl Shape for Const<4>
impl Shape for Const<4>
const NDIM: Option<usize>
type Smaller = Const<ella_common::::shape::{impl#53}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#53}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<4>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
Source§impl Shape for Const<5>
impl Shape for Const<5>
const NDIM: Option<usize>
type Smaller = Const<ella_common::::shape::{impl#56}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#56}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<5>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
Source§impl Shape for Const<6>
impl Shape for Const<6>
const NDIM: Option<usize>
type Smaller = Const<ella_common::::shape::{impl#59}::Smaller::{constant#0}>
type Larger = Dyn
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<6>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
impl<const D: usize> Eq for Const<D>
impl<const D: usize> StructuralPartialEq for Const<D>
Auto Trait Implementations§
impl<const D: usize> Freeze for Const<D>
impl<const D: usize> RefUnwindSafe for Const<D>
impl<const D: usize> Send for Const<D>
impl<const D: usize> Sync for Const<D>
impl<const D: usize> Unpin for Const<D>
impl<const D: usize> UnwindSafe for Const<D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more