fn acquire_mapping_writer<'a, T>(&self, memory: &'a B::Memory, range: Range<u64>)
        -> Result<mapping::Writer<'a, B, T>, mapping::Error>
    where
        T: Copy,
    {
        let count = (range.end - range.start) as usize / mem::size_of::<T>();
        self.map_memory(memory, range.clone())
            .map(|ptr| unsafe {
                let start_ptr = ptr as *mut _;
                mapping::Writer {
                    slice: slice::from_raw_parts_mut(start_ptr, count),
                    memory,
                    range,
                    released: false,
                }
            })
    }
/// Acquire a mapping Writer.
///
/// The accessible slice will correspond to the specified range (in bytes).
Acquire a mapping Writer.
The accessible slice will correspond to the specified range (in bytes).
Acquire a mapping Writer . The accessible slice will correspond to the specified range ( in bytes ) .
fn acquire_mapping_writer<'a, T>(&self, memory: &'a B::Memory, range: Range<u64>)
        -> Result<mapping::Writer<'a, B, T>, mapping::Error>
    where
        T: Copy,
    {
        let count = (range.end - range.start) as usize / mem::size_of::<T>();
        self.map_memory(memory, range.clone())
            .map(|ptr| unsafe {
                let start_ptr = ptr as *mut _;
                mapping::Writer {
                    slice: slice::from_raw_parts_mut(start_ptr, count),
                    memory,
                    range,
                    released: false,
                }
            })
    }
fn acquire_mapping_writer < ' a , T > ( & self , memory : & ' a B :: Memory , range : Range < u64 > ) -> Result < mapping :: Writer < ' a , B , T > , mapping :: Error > where T : Copy , { let count = ( range . end - range . start ) as usize / mem :: size_of :: < T > ( ) ; self . map_memory ( memory , range . clone ( ) ) . map ( | ptr | unsafe { let start_ptr = ptr as * mut _ ; mapping :: Writer { slice : slice :: from_raw_parts_mut ( start_ptr , count ) , memory , range , released : false , } } ) }
Acquire a mapping Writer.
Acquire a mapping Writer .
&self
memory
&'a B::Memory
range
Range<u64>