pub fn read_from<S: Read>(self, stream: &mut S) -> IoResult<usize> {
        if self.remove_garbage {
            self.buf.remove_garbage();
        }

        let v: &mut Vec<u8> = self.buf.0.get_mut();

        v.reserve(self.reserve);

        assert!(v.capacity() > v.len());
        let size = unsafe {
            let size = stream.read(&mut v.bytes_mut()[..self.reserve])?;
            v.advance_mut(size);
            size
        };
        Ok(size)
    }
/// Read next portion of data from the given input stream.
Read next portion of data from the given input stream.
Read next portion of data from the given input stream .
pub fn read_from<S: Read>(self, stream: &mut S) -> IoResult<usize> {
        if self.remove_garbage {
            self.buf.remove_garbage();
        }
        let v: &mut Vec<u8> = self.buf.0.get_mut();
        v.reserve(self.reserve);
        assert!(v.capacity() > v.len());
        let size = unsafe {
            let size = stream.read(&mut v.bytes_mut()[..self.reserve])?;
            v.advance_mut(size);
            size
        };
        Ok(size)
    }
pub fn read_from < S : Read > ( self , stream : & mut S ) -> IoResult < usize > { if self . remove_garbage { self . buf . remove_garbage ( ) ; } let v : & mut Vec < u8 > = self . buf . 0 . get_mut ( ) ; v . reserve ( self . reserve ) ; assert ! ( v capacity ( ) v len ( ) ) ; let size = unsafe { let size = stream . read ( & mut v . bytes_mut ( ) [ .. self . reserve ] ) ? ; v . advance_mut ( size ) ; size } ; Ok ( size ) }
Read next portion of data from the given input stream.
Read next portion of data from the given input stream .
self
stream
&mut S
self
stream
&mut S