fn try_push(&mut self, data: &[u8]) -> Result<()> {
        if self.octets.len() - self.cursor >= data.len() {
            self.write(self.cursor, data);
            self.cursor += data.len();
            Ok(())
        } else {
            Err(Error::Truncation)
        }
    }
/// Tries to write `data` to the underlying buffer at the current
/// cursor, failing if there is not sufficient space.
Tries to write `data` to the underlying buffer at the current
cursor, failing if there is not sufficient space.
Tries to write ` data ` to the underlying buffer at the current cursor failing if there is not sufficient space .
fn try_push(&mut self, data: &[u8]) -> Result<()> {
        if self.octets.len() - self.cursor >= data.len() {
            self.write(self.cursor, data);
            self.cursor += data.len();
            Ok(())
        } else {
            Err(Error::Truncation)
        }
    }
fn try_push ( & mut self , data : & [ u8 ] ) -> Result < ( ) > { if self . octets . len ( ) - self . cursor >= data . len ( ) { self . write ( self . cursor , data ) ; self . cursor += data . len ( ) ; Ok ( ( ) ) } else { Err ( Error :: Truncation ) } }
Tries to write `data` to the underlying buffer at the current
cursor, failing if there is not sufficient space.
Tries to write ` data ` to the underlying buffer at the current cursor failing if there is not sufficient space .
&mut self
data
&[u8]
&mut self
data
&[u8]