pub fn read<R: std::io::Read>(&mut self,
                                  n_bytes: usize,
                                  r: &mut R)
                                  -> Result<usize, std::io::Error> {
        let cur_size = self.size;
        self.resize(cur_size + n_bytes);
        unsafe {
            let s = std::slice::from_raw_parts_mut(self.p.offset(cur_size as isize), n_bytes);
            r.read(s)
        }
    }
// append n_bytes bytes at the end of this cryptobuf.
append n_bytes bytes at the end of this cryptobuf.
append n_bytes bytes at the end of this cryptobuf .
pub fn read<R: std::io::Read>(&mut self,
                                  n_bytes: usize,
                                  r: &mut R)
                                  -> Result<usize, std::io::Error> {
        let cur_size = self.size;
        self.resize(cur_size + n_bytes);
        unsafe {
            let s = std::slice::from_raw_parts_mut(self.p.offset(cur_size as isize), n_bytes);
            r.read(s)
        }
    }
pub fn read < R : std :: io :: Read > ( & mut self , n_bytes : usize , r : & mut R ) -> Result < usize , std :: io :: Error > { let cur_size = self . size ; self . resize ( cur_size + n_bytes ) ; unsafe { let s = std :: slice :: from_raw_parts_mut ( self . p . offset ( cur_size as isize ) , n_bytes ) ; r . read ( s ) } }
append n_bytes bytes at the end of this cryptobuf.
append n_bytes bytes at the end of this cryptobuf .
&mut self
n_bytes
usize
r
&mut R
&mut self
n_bytes
usize
r
&mut R