[−][src]Struct pvec::core::RrbVec
A persistent vector based on the relaxed RrbTree.
Methods
impl<T: Clone + Debug> RrbVec<T>
[src]
pub fn new() -> Self
[src]
Constructs a new, empty vector. The vector allocates a buffer equal to the selected branching factor size.
pub fn push(&mut self, item: T)
[src]
Adds an element to the back of a collection.
pub fn pop(&mut self) -> Option<T>
[src]
Removes the last element from a vector and returns it, or None if it is empty.
pub fn get(&self, index: usize) -> Option<&T>
[src]
Returns a reference to an element at the given position or None if out of bounds.
pub fn get_mut(&mut self, index: usize) -> Option<&mut T>
[src]
Returns a mutable reference to an element at the given position or None if out of bounds.
pub fn len(&self) -> usize
[src]
Returns the number of elements in the vector.
pub fn is_empty(&self) -> bool
[src]
Returns true if the vector has a length of 0.
impl<T: Clone + Debug> RrbVec<T>
[src]
pub fn split_off(&mut self, mid: usize) -> Self
[src]
Splits the collection into two at the given index.
Returns a vector containing the elements in the range [at, len). After the call, the original vector will be left containing the elements [0, at).
pub fn append(&mut self, that: &mut RrbVec<T>)
[src]
Moves all the elements of that
into Self
by concatenating
the underlying tree structures, leaving other
empty.
Trait Implementations
impl<T: Clone> Clone for RrbVec<T>
[src]
impl<T: Debug> Debug for RrbVec<T>
[src]
impl<T: Clone + Debug> Default for RrbVec<T>
[src]
impl<T: Eq> Eq for RrbVec<T>
[src]
impl<'_, T: Clone + Debug> From<&'_ Vec<T>> for RrbVec<T>
[src]
impl<T: Clone + Debug> FromIterator<T> for RrbVec<T>
[src]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
impl<T: Clone + Debug> Index<usize> for RrbVec<T>
[src]
impl<T: Clone + Debug> IndexMut<usize> for RrbVec<T>
[src]
impl<T: Clone + Debug> IntoIterator for RrbVec<T>
[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = RrbVecIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T: Ord> Ord for RrbVec<T>
[src]
fn cmp(&self, other: &RrbVec<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<RrbVec<T>> for RrbVec<T>
[src]
impl<T: PartialOrd> PartialOrd<RrbVec<T>> for RrbVec<T>
[src]
fn partial_cmp(&self, other: &RrbVec<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &RrbVec<T>) -> bool
[src]
fn le(&self, other: &RrbVec<T>) -> bool
[src]
fn gt(&self, other: &RrbVec<T>) -> bool
[src]
fn ge(&self, other: &RrbVec<T>) -> bool
[src]
impl<T> StructuralEq for RrbVec<T>
[src]
impl<T> StructuralPartialEq for RrbVec<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for RrbVec<T>
impl<T> !Send for RrbVec<T>
impl<T> !Sync for RrbVec<T>
impl<T> Unpin for RrbVec<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for RrbVec<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,