pub struct ShapeRef(/* private fields */);Implementations§
Source§impl ShapeRef
impl ShapeRef
pub fn new(x: &[Option<usize>]) -> &Self
pub fn new_mut(x: &mut [Option<usize>]) -> &mut Self
pub fn as_slice(&self) -> &[Option<usize>]
pub fn as_mut_slice(&mut self) -> &mut [Option<usize>]
pub fn is_empty(&self) -> bool
pub fn dims(&self) -> usize
pub fn total(&self) -> Option<usize>
pub fn get(&self, x: usize) -> Option<&Option<usize>>
pub fn get_mut(&mut self, x: usize) -> Option<&mut Option<usize>>
pub fn iter( &self, ) -> impl ExactSizeIterator<Item = &Option<usize>> + DoubleEndedIterator
pub fn iter_mut( &mut self, ) -> impl ExactSizeIterator<Item = &mut Option<usize>> + DoubleEndedIterator
pub fn first(&self) -> Option<&Option<usize>>
pub fn first_mut(&mut self) -> Option<&mut Option<usize>>
pub fn last(&self) -> Option<&Option<usize>>
pub fn last_mut(&mut self) -> Option<&mut Option<usize>>
pub fn calc_index(&self, index: &[usize]) -> Option<usize>
pub fn calc_index_expr(&self, index: &[Expression]) -> Option<Expression>
pub fn calc_range(&self, index: &[usize]) -> Option<(usize, usize)>
Trait Implementations§
Source§impl BorrowMut<ShapeRef> for Shape
impl BorrowMut<ShapeRef> for Shape
Source§fn borrow_mut(&mut self) -> &mut ShapeRef
fn borrow_mut(&mut self) -> &mut ShapeRef
Mutably borrows from an owned value. Read more
Source§impl PartialOrd for ShapeRef
impl PartialOrd for ShapeRef
Source§impl ToOwned for ShapeRef
impl ToOwned for ShapeRef
impl Eq for ShapeRef
impl StructuralPartialEq for ShapeRef
Auto Trait Implementations§
impl Freeze for ShapeRef
impl RefUnwindSafe for ShapeRef
impl Send for ShapeRef
impl !Sized for ShapeRef
impl Sync for ShapeRef
impl Unpin for ShapeRef
impl UnsafeUnpin for ShapeRef
impl UnwindSafe for ShapeRef
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.