pub fn len(&self) -> usize {
        if self.start <= self.end {
            self.end - self.start
        } else {
            self.buffer.len() + self.end - self.start
        }
    }
/**
    Returns current number of elements in the buffer.

    # Example

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

    fn main(){
        let mut cb:CircularBuffer<i32> = CircularBuffer::new(5);
        assert_eq!(cb.len(), 0);
        cb.push_back(1);
        assert_eq!(cb.len(), 1);

    }
    ```
    */
Returns current number of elements in the buffer.
Returns current number of elements in the buffer .
pub fn len(&self) -> usize {
        if self.start <= self.end {
            self.end - self.start
        } else {
            self.buffer.len() + self.end - self.start
        }
    }
pub fn len ( & self ) -> usize { if self . start <= self . end { self . end - self . start } else { self . buffer . len ( ) + self . end - self . start } }
Returns current number of elements in the buffer.
Returns current number of elements in the buffer .
&self
&self
example
```
use advanced_collections::circular_buffer::CircularBuffer.

fn main(){
let mut cb:CircularBuffer = CircularBuffer::new(5);
assert_eq!(cb.len(), 0);
cb.push_back(1);
assert_eq!(cb.len(), 1).


` ` ` use advanced_collections :: circular_buffer :: CircularBuffer . fn main () { let mut cb : CircularBuffer = CircularBuffer :: new ( 5 ) ; assert_eq! ( cb . len () 0 ) ; cb . push_back ( 1 ) ; assert_eq! ( cb . len () 1 ) .