/// Read the next chunk from the stable memory
Read the next chunk from the stable memory
Read the next chunk from the stable memory
fn read(&mut self) {
        self.buffer.clear();
        let stable_mem_len = self.stable_mem.length();
        // Number of bytes to read: minimum of buffer size and remaining amount
        let n_bytes = min(
            self.buffer.capacity() as u32, // cast works as the initialization argument is u32
            stable_mem_len - self.stable_mem_offset,
        );
        self.buffer = self.stable_mem.read(self.stable_mem_offset, n_bytes);
        self.buffer_offset = 0;
        self.stable_mem_offset += n_bytes;
    }
fn read ( & mut self ) { self . buffer . clear ( ) ; let stable_mem_len = self . stable_mem . length ( ) ; // Number of bytes to read: minimum of buffer size and remaining amount let n_bytes = min ( self . buffer . capacity ( ) as u32 , // cast works as the initialization argument is u32 stable_mem_len - self . stable_mem_offset , ) ; self . buffer = self . stable_mem . read ( self . stable_mem_offset , n_bytes ) ; self . buffer_offset = 0 ; self . stable_mem_offset += n_bytes ; }
Read the next chunk from the stable memory
Read the next chunk from the stable memory
&mut self