pub fn shift(&mut self) {
    if self.position > 0 {
      unsafe {
        let length = self.end - self.position;
        ptr::copy( (&self.memory[self.position..self.end]).as_ptr(), (&mut self.memory[..length]).as_mut_ptr(), length);
        self.position = 0;
        self.end      = length;
      }
    }
  }
/// moves the data at the beginning of the buffer
///
/// if the position was more than 0, it is now 0
moves the data at the beginning of the buffer
if the position was more than 0, it is now 0
moves the data at the beginning of the buffer if the position was more than 0 it is now 0
pub fn shift(&mut self) {
    if self.position > 0 {
      unsafe {
        let length = self.end - self.position;
        ptr::copy( (&self.memory[self.position..self.end]).as_ptr(), (&mut self.memory[..length]).as_mut_ptr(), length);
        self.position = 0;
        self.end      = length;
      }
    }
  }
pub fn shift ( & mut self ) { if self . position > 0 { unsafe { let length = self . end - self . position ; ptr :: copy ( ( & self . memory [ self . position .. self . end ] ) . as_ptr ( ) , ( & mut self . memory [ .. length ] ) . as_mut_ptr ( ) , length ) ; self . position = 0 ; self . end = length ; } } }
moves the data at the beginning of the buffer
if the position was more than 0, it is now 0
moves the data at the beginning of the buffer if the position was more than 0 it is now 0
&mut self
&mut self