doc.rust-lang.org
pub struct SymmetricDifference<'a, T>
A lazy iterator producing elements in the symmetric difference of BTreeSets.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Range<'a, T>
An iterator over a sub-range of items in a BTreeSet.
struct
alloc
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Iter<'a, T>
An iterator over the items of a BTreeSet.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct IntoIter<T, A>
An owning iterator over the items of a BTreeSet in ascending order.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Intersection<'a, T, A>
A lazy iterator producing elements in the intersection of BTreeSets.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ExtractIf<'a, T, R, F, A>
This struct is created by the extract_if method on BTreeSet.
struct
alloc
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Difference<'a, T, A>
A lazy iterator producing elements in the difference of BTreeSets.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn union<'a>(&'a self, other: &'a BTreeSet<T, A>) -> Union<'a, T>
Visits the elements representing the union, i.e., all the elements in self or other, without duplicates, in ascending order.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn take<Q>(&mut self, value: &Q) -> Option<T>
Removes and returns the element in the set, if any, that is equal to the value.
method
alloc
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn symmetric_difference<'a>(&'a self, other: &'a BTreeSet<T, A>) -> SymmetricDifference<'a, T>
Visits the elements representing the symmetric difference, i.e., the elements that are in self or in other but not in both, in ascending order.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn split_off<Q>(&mut self, value: &Q) -> Self
Splits the collection into two at the value. Returns a new collection with all elements greater than or equal to the value.
method
alloc
Stable since 1.11.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn retain<F>(&mut self, f: F)
Retains only the elements specified by the predicate.
method
alloc
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn replace(&mut self, value: T) -> Option<T>
Adds a value to the set, replacing the existing element, if any, that is equal to the value. Returns the replaced element.
method
alloc
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove<Q>(&mut self, value: &Q) -> bool
If the set contains an element equal to the value, removes it from the set and drops it. Returns whether such an element was present.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn range<K, R>(&self, range: R) -> Range<'_, T>
Constructs a double-ended iterator over a sub-range of elements in the set. The simplest way is to use the range syntax min..max, thus range(min..max) will yield elements from min (inclusive) to max (exclusive). The range may also be entered as (Bound<T>, Bound<T>), so for example range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive range from 4 to 10.
method
alloc
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn pop_last(&mut self) -> Option<T>
Removes the last element from the set and returns it, if any. The last element is always the maximum element in the set.
method
alloc
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn pop_first(&mut self) -> Option<T>
Removes the first element from the set and returns it, if any. The first element is always the minimum element in the set.
method
alloc
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new() -> BTreeSet<T>
Makes a new, empty BTreeSet.
associated_function
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn len(&self) -> usize
Returns the number of elements in the set.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn last(&self) -> Option<&T>
Returns a reference to the last element in the set, if any. This element is always the maximum of all elements in the set.
method
alloc
Stable since 1.66.0
Version 1.100.0-nightly