Trait BTreeSetExt

Source
pub trait BTreeSetExt<T>
where T: Ord,
{
Show 18 methods // Required methods fn first(&self) -> Option<&T>; fn last(&self) -> Option<&T>; fn get_next(&self, key: &T) -> Option<&T>; fn get_next_excluded(&self, key: &T) -> Option<&T>; fn get_next_back(&self, key: &T) -> Option<&T>; fn get_next_back_excluded(&self, key: &T) -> Option<&T>; fn pop_first(&mut self) -> Option<T> where T: Clone; fn pop_last(&mut self) -> Option<T> where T: Clone; fn pop_next(&mut self, key: &T) -> Option<T> where T: Clone; fn pop_next_excluded(&mut self, key: &T) -> Option<T> where T: Clone; fn pop_next_back(&mut self, key: &T) -> Option<T> where T: Clone; fn pop_next_back_excluded(&mut self, key: &T) -> Option<T> where T: Clone; fn pop_first_if<P>(&mut self, pred: P) -> Option<T> where T: Clone, P: FnMut(&T) -> bool; fn pop_last_if<P>(&mut self, pred: P) -> Option<T> where T: Clone, P: FnMut(&T) -> bool; fn pop_next_if<P>(&mut self, key: &T, pred: P) -> Option<T> where T: Clone, P: FnMut(&T) -> bool; fn pop_next_excluded_if<P>(&mut self, key: &T, pred: P) -> Option<T> where T: Clone, P: FnMut(&T) -> bool; fn pop_next_back_if<P>(&mut self, key: &T, pred: P) -> Option<T> where T: Clone, P: FnMut(&T) -> bool; fn pop_next_back_excluded_if<P>(&mut self, key: &T, pred: P) -> Option<T> where T: Clone, P: FnMut(&T) -> bool;
}

Required Methods§

Source

fn first(&self) -> Option<&T>

Source

fn last(&self) -> Option<&T>

Source

fn get_next(&self, key: &T) -> Option<&T>

Source

fn get_next_excluded(&self, key: &T) -> Option<&T>

Source

fn get_next_back(&self, key: &T) -> Option<&T>

Source

fn get_next_back_excluded(&self, key: &T) -> Option<&T>

Source

fn pop_first(&mut self) -> Option<T>
where T: Clone,

Source

fn pop_last(&mut self) -> Option<T>
where T: Clone,

Source

fn pop_next(&mut self, key: &T) -> Option<T>
where T: Clone,

Source

fn pop_next_excluded(&mut self, key: &T) -> Option<T>
where T: Clone,

Source

fn pop_next_back(&mut self, key: &T) -> Option<T>
where T: Clone,

Source

fn pop_next_back_excluded(&mut self, key: &T) -> Option<T>
where T: Clone,

Source

fn pop_first_if<P>(&mut self, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source

fn pop_last_if<P>(&mut self, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source

fn pop_next_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source

fn pop_next_excluded_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source

fn pop_next_back_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source

fn pop_next_back_excluded_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> BTreeSetExt<T> for BTreeSet<T>
where T: Ord,

Source§

fn first(&self) -> Option<&T>

Source§

fn last(&self) -> Option<&T>

Source§

fn get_next(&self, key: &T) -> Option<&T>

Source§

fn get_next_excluded(&self, key: &T) -> Option<&T>

Source§

fn get_next_back(&self, key: &T) -> Option<&T>

Source§

fn get_next_back_excluded(&self, key: &T) -> Option<&T>

Source§

fn pop_first(&mut self) -> Option<T>
where T: Clone,

Source§

fn pop_last(&mut self) -> Option<T>
where T: Clone,

Source§

fn pop_next(&mut self, key: &T) -> Option<T>
where T: Clone,

Source§

fn pop_next_excluded(&mut self, key: &T) -> Option<T>
where T: Clone,

Source§

fn pop_next_back(&mut self, key: &T) -> Option<T>
where T: Clone,

Source§

fn pop_next_back_excluded(&mut self, key: &T) -> Option<T>
where T: Clone,

Source§

fn pop_first_if<P>(&mut self, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source§

fn pop_last_if<P>(&mut self, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source§

fn pop_next_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source§

fn pop_next_excluded_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source§

fn pop_next_back_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Source§

fn pop_next_back_excluded_if<P>(&mut self, key: &T, pred: P) -> Option<T>
where T: Clone, P: FnMut(&T) -> bool,

Implementors§