/// Reserves capacity for at least `amt` bytes to be wrote
Reserves capacity for at least `amt` bytes to be wrote
Reserves capacity for at least ` amt ` bytes to be wrote
pub fn reserve(&mut self, amt: usize) {
        let amt = amt.max(if self.buf.is_empty() {
            self.min_write * 2
        } else {
            self.min_write
        });
        if self.buf.len() < self.wrote + amt {
            if self.buf.len() >= self.len() + amt {
                self.move_data_to_front();
                return;
            }
            self.grow(amt);
        }
    }
pub fn reserve ( & mut self , amt : usize ) { let amt = amt . max ( if self . buf . is_empty ( ) { self . min_write * 2 } else { self . min_write } ) ; if self . buf . len ( ) < self . wrote + amt { if self . buf . len ( ) >= self . len ( ) + amt { self . move_data_to_front ( ) ; return ; } self . grow ( amt ) ; } }
Reserves capacity for at least `amt` bytes to be wrote
Reserves capacity for at least ` amt ` bytes to be wrote
&mut self
amt
usize