pub struct MemorySlice<C> { /* private fields */ }
Implementations§
Source§impl<C: Clone> MemorySlice<C>
impl<C: Clone> MemorySlice<C>
pub fn check_correct_dims( memory_slice: &MemorySlice<C>, access: &[SliceCapacity], new_values: &MemorySlice<C>, is_strict: bool, ) -> Result<(), MemoryError>
pub fn new(initial_value: &C) -> MemorySlice<C>
pub fn new_array(route: Vec<SliceCapacity>, values: Vec<C>) -> MemorySlice<C>
pub fn new_with_route( route: &[SliceCapacity], initial_value: &C, ) -> MemorySlice<C>
pub fn insert_values( memory_slice: &mut MemorySlice<C>, access: &[SliceCapacity], new_values: &MemorySlice<C>, is_strict: bool, ) -> Result<(), MemoryError>
pub fn insert_value_by_index( memory_slice: &mut MemorySlice<C>, index: usize, new_value: C, ) -> Result<(), MemoryError>
pub fn get_access_index( memory_slice: &MemorySlice<C>, index: usize, ) -> Result<Vec<SliceCapacity>, MemoryError>
pub fn access_values( memory_slice: &MemorySlice<C>, access: &[SliceCapacity], ) -> Result<MemorySlice<C>, MemoryError>
pub fn access_value_by_index( memory_slice: &MemorySlice<C>, index: usize, ) -> Result<C, MemoryError>
pub fn get_reference_to_single_value<'a>( memory_slice: &'a MemorySlice<C>, access: &[SliceCapacity], ) -> Result<&'a C, MemoryError>
pub fn get_reference_to_single_value_by_index<'a>( memory_slice: &'a MemorySlice<C>, index: usize, ) -> Result<&'a C, MemoryError>
pub fn get_reference_to_single_value_by_index_or_break<'a>( memory_slice: &'a MemorySlice<C>, index: usize, ) -> &'a C
pub fn get_mut_reference_to_single_value<'a>( memory_slice: &'a mut MemorySlice<C>, access: &[SliceCapacity], ) -> Result<&'a mut C, MemoryError>
pub fn get_number_of_cells(memory_slice: &MemorySlice<C>) -> SliceCapacity
pub fn route(&self) -> &[SliceCapacity] ⓘ
pub fn is_single(&self) -> bool
pub fn unwrap_to_single(memory_slice: MemorySlice<C>) -> C
pub fn destruct(self) -> (Vec<SliceCapacity>, Vec<C>)
Trait Implementations§
Source§impl<C: Clone> Clone for MemorySlice<C>
impl<C: Clone> Clone for MemorySlice<C>
Source§impl<C: PartialEq> PartialEq for MemorySlice<C>
impl<C: PartialEq> PartialEq for MemorySlice<C>
impl<C: Eq> Eq for MemorySlice<C>
impl<C> StructuralPartialEq for MemorySlice<C>
Auto Trait Implementations§
impl<C> Freeze for MemorySlice<C>
impl<C> RefUnwindSafe for MemorySlice<C>where
C: RefUnwindSafe,
impl<C> Send for MemorySlice<C>where
C: Send,
impl<C> Sync for MemorySlice<C>where
C: Sync,
impl<C> Unpin for MemorySlice<C>where
C: Unpin,
impl<C> UnwindSafe for MemorySlice<C>where
C: UnwindSafe,
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