pub struct BTreeSet<T, A: Allocator = PoolAlloc> { /* private fields */ }Expand description
用户可以定制内部节点的分配策略.
Implementations§
Source§impl<T: Ord, A: Allocator> BTreeSet<T, A>
impl<T: Ord, A: Allocator> BTreeSet<T, A>
pub fn new_in(degree: u16, alloc: A) -> Self
pub fn iter(&self) -> impl DoubleEndedIterator<Item = &T>
pub fn empty(&self) -> bool
pub fn get<Q>(&self, key: &Q) -> Option<&T>
pub fn range<Q, R>(&self, range: R) -> impl DoubleEndedIterator<Item = &T>
pub fn insert(&mut self, val: T) -> Result<(), Error>
pub fn remove<Q>(&mut self, key: &Q) -> Option<T>
Trait Implementations§
impl<T: Send, A: Allocator + Send> Send for BTreeSet<T, A>
impl<T: Sync, A: Allocator + Sync> Sync for BTreeSet<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for BTreeSet<T, A>where
A: Freeze,
impl<T, A> RefUnwindSafe for BTreeSet<T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, A> Unpin for BTreeSet<T, A>where
A: Unpin,
impl<T, A> UnwindSafe for BTreeSet<T, A>where
A: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more