pub fn as_slice_mut(&mut self, j: &Journal<A>) -> &mut [T] {
        let res = Self::__to_slice_mut(self.off(), self.len());
        if self.has_log == 0 {
            unsafe {
                res.create_log(j, Notifier::NonAtomic(Ptr::from_ref(&self.has_log)));
            }
        }
        self.to_slice_mut()
    }
/// Consumes the vector and converts it into a slice.
/// Since we should create a log of the context, this function is transactional
/// 
/// # Examples
/// 
/// ```
/// # use corundum::vec::Vec;
/// # use corundum::alloc::heap::*;
/// Heap::transaction(|j| {
///     let mut vec = Vec::from_slice(&[1,2,3], j);
///     let s = vec.as_slice_mut(j);
///     s[1] = 0;
///     assert_eq!(s,   [1, 0, 3]);
///     assert_eq!(vec, [1, 0, 3]);
/// }).unwrap();
/// ```
/// 
Consumes the vector and converts it into a slice.
Since we should create a log of the context, this function is transactional
Consumes the vector and converts it into a slice . Since we should create a log of the context this function is transactional
pub fn as_slice_mut(&mut self, j: &Journal<A>) -> &mut [T] {
        let res = Self::__to_slice_mut(self.off(), self.len());
        if self.has_log == 0 {
            unsafe {
                res.create_log(j, Notifier::NonAtomic(Ptr::from_ref(&self.has_log)));
            }
        }
        self.to_slice_mut()
    }
pub fn as_slice_mut ( & mut self , j : & Journal < A > ) -> & mut [ T ] { let res = Self :: __to_slice_mut ( self . off ( ) , self . len ( ) ) ; if self . has_log == 0 { unsafe { res . create_log ( j , Notifier :: NonAtomic ( Ptr :: from_ref ( & self . has_log ) ) ) ; } } self . to_slice_mut ( ) }
Consumes the vector and converts it into a slice.
Consumes the vector and converts it into a slice .
&mut self
j
&Journal<A>
examples
None
use corundum::vec::vec;
None
use corundum::alloc::heap::*;
None