pub(crate) fn read(&mut self, rd: &mut dyn Read) -> Result<usize, std::io::Error> {
        if self.buffer.available_space() == 0 {
            debug!("uh oh, buffer has no available space!")
        }

        match rd.read(self.buffer.space()) {
            Ok(written) => {
                self.read_bytes += written as u64;
                self.buffer.fill(written);
                Ok(written)
            }
            Err(e) => Err(e),
        }
    }
/// fill that buffer from the given Read
fill that buffer from the given Read
fill that buffer from the given Read
pub(crate) fn read(&mut self, rd: &mut dyn Read) -> Result<usize, std::io::Error> {
        if self.buffer.available_space() == 0 {
            debug!("uh oh, buffer has no available space!")
        }
        match rd.read(self.buffer.space()) {
            Ok(written) => {
                self.read_bytes += written as u64;
                self.buffer.fill(written);
                Ok(written)
            }
            Err(e) => Err(e),
        }
    }
pub ( crate ) fn read ( & mut self , rd : & mut dyn Read ) -> Result < usize , std :: io :: Error > { if self . buffer . available_space ( ) == 0 { debug ! ( " " ) } match rd . read ( self . buffer . space ( ) ) { Ok ( written ) => { self . read_bytes += written as u64 ; self . buffer . fill ( written ) ; Ok ( written ) } Err ( e ) => Err ( e ) , } }
fill that buffer from the given Read
fill that buffer from the given Read
&mut self
rd
&mut dyn Read
&mut self
rd
&mut dyn Read