pub fn write(&mut self, data: &[u8]) -> usize {
        let amt = (self.capacity as usize - self.buffer.len()).min(data.len());
        self.buffer.extend(&data[0..amt]);
        amt
    }
/// Write the given data to the end of the send buffer, up to the available amount to be written.
Write the given data to the end of the send buffer, up to the available amount to be written.
Write the given data to the end of the send buffer up to the available amount to be written .
pub fn write(&mut self, data: &[u8]) -> usize {
        let amt = (self.capacity as usize - self.buffer.len()).min(data.len());
        self.buffer.extend(&data[0..amt]);
        amt
    }
pub fn write ( & mut self , data : & [ u8 ] ) -> usize { let amt = ( self . capacity as usize - self . buffer . len ( ) ) . min ( data . len ( ) ) ; self . buffer . extend ( & data [ 0 .. amt ] ) ; amt }
Write the given data to the end of the send buffer, up to the available amount to be written.
Write the given data to the end of the send buffer up to the available amount to be written .
&mut self
data
&[u8]
&mut self
data
&[u8]