Trait bip_bencode::BListAccess [] [src]

pub trait BListAccess<V> {
    fn get(&self, index: usize) -> Option<&V>;
    fn get_mut(&mut self, index: usize) -> Option<&mut V>;
    fn remove(&mut self, index: usize) -> Option<V>;
    fn insert(&mut self, index: usize, item: V);
    fn push(&mut self, item: V);
    fn len(&self) -> usize;
}

Trait for working with generic list data structures.

Required Methods

Get a list element at the given index.

Get a mutable list element at the given index.

Remove a list element at the given index.

Insert a list element at the given index.

Push an element to the back of the list.

Get the length of the list.

Trait Implementations

impl<'a, V: 'a> Index<usize> for &'a BListAccess<V>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'a, V: 'a> Index<usize> for &'a mut BListAccess<V>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'a, V: 'a> IndexMut<usize> for &'a mut BListAccess<V>
[src]

The method for the mutable indexing (container[index]) operation

impl<'a, V: 'a> IntoIterator for &'a BListAccess<V>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Implementors