unsafe fn swap(&mut self) {
        // The cast is ok, we have an exclusive access to both buffers
        // (&mut [T] and Vec<T>). The caller guarantees that the write buffer is
        // consistent and therefore it's safe to read from it and use it as a
        // read buffer.
        let temp = self.write_buf as *const T;
        self.write_buf = self.read_buf as *mut T;
        self.read_buf = temp;
    }
/// Swaps the read and write buffers.
/// 
/// Caller must ensure that the write buffer is consistent before calling
/// this function.
Swaps the read and write buffers.
Caller must ensure that the write buffer is consistent before calling
this function.
Swaps the read and write buffers . Caller must ensure that the write buffer is consistent before calling this function .
unsafe fn swap(&mut self) {
        // The cast is ok, we have an exclusive access to both buffers
        // (&mut [T] and Vec<T>). The caller guarantees that the write buffer is
        // consistent and therefore it's safe to read from it and use it as a
        // read buffer.
        let temp = self.write_buf as *const T;
        self.write_buf = self.read_buf as *mut T;
        self.read_buf = temp;
    }
unsafe fn swap ( & mut self ) { // The cast is ok, we have an exclusive access to both buffers // (&mut [T] and Vec<T>). The caller guarantees that the write buffer is // consistent and therefore it's safe to read from it and use it as a // read buffer. let temp = self . write_buf as * const T ; self . write_buf = self . read_buf as * mut T ; self . read_buf = temp ; }
Swaps the read and write buffers.
Swaps the read and write buffers .
&mut self