/**
    Returns two slices to the internal buffer.

    Because the internal buffer is circular, normally it is not possible to represent it
    as a single slice of data, but it is possible to represent it as two slices -
    one after another.

    # Example

    ```
    use advanced_collections::circular_buffer::CircularBuffer;

    fn main(){
      let mut cb = CircularBuffer::from(vec![1,2,3]);
      cb.push_back(4);
      cb.push_back(5);
      assert_eq!(cb.slices(), ([3,4].as_ref(), [5].as_ref()));
    }
    ```
    */
Returns two slices to the internal buffer.
Because the internal buffer is circular, normally it is not possible to represent it
as a single slice of data, but it is possible to represent it as two slices
one after another.
Returns two slices to the internal buffer . Because the internal buffer is circular normally it is not possible to represent it as a single slice of data but it is possible to represent it as two slices one after another .
pub fn slices(&self) -> (&[T], &[T]){
        let (a,b) = if self.start <= self.end {
            (&self.buffer[self.start..self.end], &self.buffer[0..0])
        } else {
            (&self.buffer[self.start..], &self.buffer[..self.end])
        };
        //ManuallyDrop is a zero-cost wrapper, can be safely converted into slice of T
        unsafe{(transmute(a), transmute(b))}
    }
pub fn slices ( & self ) -> ( & [ T ] , & [ T ] ) { let ( a , b ) = if self . start <= self . end { ( & self . buffer [ self . start .. self . end ] , & self . buffer [ 0 .. 0 ] ) } else { ( & self . buffer [ self . start .. ] , & self . buffer [ .. self . end ] ) } ; //ManuallyDrop is a zero-cost wrapper, can be safely converted into slice of T unsafe { ( transmute ( a ) , transmute ( b ) ) } }
Returns two slices to the internal buffer.
Returns two slices to the internal buffer .
&self
example
```
use advanced_collections::circular_buffer::CircularBuffer.


` ` ` use advanced_collections :: circular_buffer :: CircularBuffer .