Struct ds::BTreeSeq

source ·
pub struct BTreeSeq<T> { /* private fields */ }

Implementations§

source§

impl<T> BTreeSeq<T>

source

pub fn new() -> BTreeSeq<T>

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn push_back(&mut self, elt: T)

source

pub fn push_front(&mut self, elt: T)

source

pub fn pop_back(&mut self) -> Option<T>

source

pub fn pop_front(&mut self) -> Option<T>

source

pub fn adjoin(&mut self, elt: T, other: BTreeSeq<T>)

source

pub fn append(&mut self, other: BTreeSeq<T>)

source

pub fn split_off(&mut self, at: usize) -> BTreeSeq<T>

source

pub fn iter<'a>(&'a self) -> Iter<'a, T>

source

pub fn iter_mut<'a>(&'a mut self) -> IterMut<'a, T>

source

pub fn into_iter(self) -> IntoIter<T>

source

pub fn range<'a>(&'a self, range: impl RangeBounds<usize>) -> Range<'a, T>

source

pub fn range_mut<'a>( &'a mut self, range: impl RangeBounds<usize>, ) -> RangeMut<'a, T>

source

pub fn bisect<'a, F>(&'a self, predicate: F) -> (Option<&'a T>, usize)
where F: Fn(&T) -> bool,

source

pub fn bisect_mut<'a, F>( &'a mut self, predicate: F, ) -> (Option<&'a mut T>, usize)
where F: Fn(&T) -> bool,

source

pub fn insert(&mut self, at: usize, elt: T)

source

pub fn remove(&mut self, at: usize) -> T

source

pub fn rotate(&mut self, new_first: usize)

source

pub unsafe fn get_unchecked(&self, index: usize) -> &T

§Safety

i < self.len()

source

pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T

§Safety

i < self.len()

source

pub fn get(&self, index: usize) -> Option<&T>

source

pub fn get_mut(&mut self, index: usize) -> Option<&mut T>

Trait Implementations§

source§

impl<T> Clone for BTreeSeq<T>
where T: Clone,

source§

fn clone(&self) -> BTreeSeq<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for BTreeSeq<T>
where T: Debug,

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for BTreeSeq<T>

source§

fn default() -> BTreeSeq<T>

Returns the “default value” for a type. Read more
source§

impl<T> Drop for BTreeSeq<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> Extend<T> for BTreeSeq<T>

source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T> FromIterator<T> for BTreeSeq<T>

source§

fn from_iter<I>(iter: I) -> BTreeSeq<T>
where I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
source§

impl<T> Index<usize> for BTreeSeq<T>

source§

type Output = T

The returned type after indexing.
source§

fn index(&self, index: usize) -> &<BTreeSeq<T> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<usize> for BTreeSeq<T>

source§

fn index_mut( &mut self, index: usize, ) -> &mut <BTreeSeq<T> as Index<usize>>::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T> IntoIterator for &'a BTreeSeq<T>

source§

type Item = &'a T

The type of the elements being iterated over.
source§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a BTreeSeq<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T> IntoIterator for &'a mut BTreeSeq<T>

source§

type Item = &'a mut T

The type of the elements being iterated over.
source§

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a mut BTreeSeq<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<T> IntoIterator for BTreeSeq<T>

source§

type Item = T

The type of the elements being iterated over.
source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <BTreeSeq<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<T> Ord for BTreeSeq<T>
where T: Ord,

source§

fn cmp(&self, other: &BTreeSeq<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
source§

impl<T> PartialEq for BTreeSeq<T>
where T: PartialEq,

source§

fn eq(&self, other: &BTreeSeq<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialOrd for BTreeSeq<T>
where T: PartialOrd,

source§

fn partial_cmp(&self, other: &BTreeSeq<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<T> Eq for BTreeSeq<T>
where T: Eq,

Auto Trait Implementations§

§

impl<T> Freeze for BTreeSeq<T>

§

impl<T> RefUnwindSafe for BTreeSeq<T>
where T: RefUnwindSafe,

§

impl<T> !Send for BTreeSeq<T>

§

impl<T> !Sync for BTreeSeq<T>

§

impl<T> Unpin for BTreeSeq<T>
where T: Unpin,

§

impl<T> UnwindSafe for BTreeSeq<T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.