Struct Range

#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct Range<'a, T: 'a> { pub(in ::collections::btree::set) iter: Range<'a, T, SetValZST> }

An iterator over a sub-range of items in a BTreeSet.

This struct is created by the range method on BTreeSet. See its documentation for more.

Fields

iter: Range<'a, T, SetValZST>

Trait Implementations

impl<'a, T> DoubleEndedIterator for Range<'a, T>

fn next_back(&mut self) -> Option<&'a T>

impl<'a, T> Iterator for Range<'a, T>

type Item = &'a T;
fn next(&mut self) -> Option<&'a T>
fn last(self) -> Option<&'a T>
fn min(self) -> Option<&'a T>
where
    &'a T: Ord,
fn max(self) -> Option<&'a T>
where
    &'a T: Ord,

impl<'a, T: Debug + 'a> Debug for Range<'a, T>

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

impl<T> Clone for Range<'_, T>

fn clone(&self) -> Self

impl<T> Default for Range<'_, T>

fn default() -> Self

Creates an empty btree_set::Range.

# use std::collections::btree_set;
let iter: btree_set::Range<'_, u8> = Default::default();
assert_eq!(iter.count(), 0);

impl<T> FusedIterator for Range<'_, T>

Auto Trait Implementations

impl<'a, T> Freeze for Range<'a, T> where Range<'a, T, SetValZST>: Freeze,

impl<'a, T> RefUnwindSafe for Range<'a, T> where Range<'a, T, SetValZST>: RefUnwindSafe,

impl<'a, T> Send for Range<'a, T> where Range<'a, T, SetValZST>: Send,

impl<'a, T> Sync for Range<'a, T> where Range<'a, T, SetValZST>: Sync,

impl<'a, T> Unpin for Range<'a, T> where Range<'a, T, SetValZST>: Unpin,

impl<'a, T> UnsafeUnpin for Range<'a, T> where Range<'a, T, SetValZST>: UnsafeUnpin,

impl<'a, T> UnwindSafe for Range<'a, T> where Range<'a, T, SetValZST>: UnwindSafe,

Blanket Implementations

impl<I> IntoIterator for Range<'a, T> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Range<'a, T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Range<'a, T> where T: ?Sized,

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

impl<T> CloneToUninit for Range<'a, T> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Range<'a, T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Range<'a, T> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Range<'a, T>

impl<T> ToOwned for Range<'a, T> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Range<'a, T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom<U> for Range<'a, T> where U: Into<T>,

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

impl<T, U> TryInto<U> for Range<'a, T> where U: TryFrom<T>,

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