Skip to main content

ShapeRef

Struct ShapeRef 

Source
pub struct ShapeRef(/* private fields */);

Implementations§

Source§

impl ShapeRef

Source

pub fn new(x: &[Option<usize>]) -> &Self

Source

pub fn new_mut(x: &mut [Option<usize>]) -> &mut Self

Source

pub fn as_slice(&self) -> &[Option<usize>]

Source

pub fn as_mut_slice(&mut self) -> &mut [Option<usize>]

Source

pub fn is_empty(&self) -> bool

Source

pub fn dims(&self) -> usize

Source

pub fn total(&self) -> Option<usize>

Source

pub fn get(&self, x: usize) -> Option<&Option<usize>>

Source

pub fn get_mut(&mut self, x: usize) -> Option<&mut Option<usize>>

Source

pub fn iter( &self, ) -> impl ExactSizeIterator<Item = &Option<usize>> + DoubleEndedIterator

Source

pub fn iter_mut( &mut self, ) -> impl ExactSizeIterator<Item = &mut Option<usize>> + DoubleEndedIterator

Source

pub fn first(&self) -> Option<&Option<usize>>

Source

pub fn first_mut(&mut self) -> Option<&mut Option<usize>>

Source

pub fn last(&self) -> Option<&Option<usize>>

Source

pub fn last_mut(&mut self) -> Option<&mut Option<usize>>

Source

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

Source

pub fn calc_index_expr(&self, index: &[Expression]) -> Option<Expression>

Source

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

Trait Implementations§

Source§

impl AsMut<[Option<usize>]> for Box<ShapeRef>

Source§

fn as_mut(&mut self) -> &mut [Option<usize>]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<[Option<usize>]> for ShapeRef

Source§

fn as_mut(&mut self) -> &mut [Option<usize>]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<ShapeRef> for Shape

Source§

fn as_mut(&mut self) -> &mut ShapeRef

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<ShapeRef> for ShapeRef

Source§

fn as_mut(&mut self) -> &mut ShapeRef

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<[Option<usize>]> for Box<ShapeRef>

Source§

fn as_ref(&self) -> &[Option<usize>]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<[Option<usize>]> for ShapeRef

Source§

fn as_ref(&self) -> &[Option<usize>]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<ShapeRef> for Shape

Source§

fn as_ref(&self) -> &ShapeRef

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<ShapeRef> for ShapeRef

Source§

fn as_ref(&self) -> &ShapeRef

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<ShapeRef> for Shape

Source§

fn borrow(&self) -> &ShapeRef

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<ShapeRef> for Shape

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl Debug for ShapeRef

Source§

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

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

impl Default for &ShapeRef

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Default for &mut ShapeRef

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Default for Box<ShapeRef>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for ShapeRef

Source§

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

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

impl<'a> From<&'a [Option<usize>]> for &'a ShapeRef

Source§

fn from(value: &'a [Option<usize>]) -> Self

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<&'a [Option<usize>; N]> for &'a ShapeRef

Source§

fn from(value: &'a [Option<usize>; N]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ShapeRef> for &'a [Option<usize>]

Source§

fn from(value: &'a ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl From<&ShapeRef> for Arc<ShapeRef>

Source§

fn from(value: &ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl From<&ShapeRef> for Box<ShapeRef>

Source§

fn from(value: &ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ShapeRef> for Cow<'a, ShapeRef>

Source§

fn from(value: &'a ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl From<&ShapeRef> for Rc<ShapeRef>

Source§

fn from(value: &ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl From<&ShapeRef> for Shape

Source§

fn from(value: &ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut [Option<usize>]> for &'a mut ShapeRef

Source§

fn from(value: &'a mut [Option<usize>]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut ShapeRef> for &'a mut [Option<usize>]

Source§

fn from(value: &'a mut ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl From<&mut ShapeRef> for Shape

Source§

fn from(value: &mut ShapeRef) -> Self

Converts to this type from the input type.
Source§

impl From<Box<[Option<usize>]>> for Box<ShapeRef>

Source§

fn from(value: Box<[Option<usize>]>) -> Self

Converts to this type from the input type.
Source§

impl From<Cow<'_, ShapeRef>> for Box<ShapeRef>

Source§

fn from(value: Cow<'_, ShapeRef>) -> Self

Converts to this type from the input type.
Source§

impl From<Shape> for Box<ShapeRef>

Source§

fn from(value: Shape) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Option<usize>>> for Box<ShapeRef>

Source§

fn from(value: Vec<Option<usize>>) -> Self

Converts to this type from the input type.
Source§

impl Hash for ShapeRef

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl Index<Range<usize>> for ShapeRef

Source§

type Output = [Option<usize>]

The returned type after indexing.
Source§

fn index(&self, index: Range<usize>) -> &Self::Output

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

impl Index<RangeFrom<usize>> for ShapeRef

Source§

type Output = [Option<usize>]

The returned type after indexing.
Source§

fn index(&self, index: RangeFrom<usize>) -> &Self::Output

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

impl Index<usize> for ShapeRef

Source§

type Output = Option<usize>

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

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

impl IndexMut<Range<usize>> for ShapeRef

Source§

fn index_mut(&mut self, index: Range<usize>) -> &mut Self::Output

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

impl IndexMut<RangeFrom<usize>> for ShapeRef

Source§

fn index_mut(&mut self, index: RangeFrom<usize>) -> &mut Self::Output

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

impl IndexMut<usize> for ShapeRef

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

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

impl Ord for ShapeRef

Source§

fn cmp(&self, other: &ShapeRef) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl PartialEq<&ShapeRef> for &Shape

Source§

fn eq(&self, other: &&ShapeRef) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for ShapeRef

Source§

fn eq(&self, other: &ShapeRef) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ShapeRef

Source§

fn partial_cmp(&self, other: &ShapeRef) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ToOwned for ShapeRef

Source§

type Owned = Shape

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

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

impl Eq for ShapeRef

Source§

impl StructuralPartialEq for ShapeRef

Auto Trait Implementations§

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more