pub struct RawBTree<T, S: Storage<T> = BoxStorage> { /* private fields */ }Implementations§
source§impl<T, S: Storage<T>> RawBTree<T, S>
impl<T, S: Storage<T>> RawBTree<T, S>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn address_of<Q: ?Sized>( &self, cmp: impl Fn(&T, &Q) -> Ordering, key: &Q ) -> Result<Address<S::Node>, Option<Address<S::Node>>>
pub fn first_item_address(&self) -> Option<Address<S::Node>>
sourcepub unsafe fn get_mut_at(&mut self, addr: Address<S::Node>) -> Option<&mut T>
pub unsafe fn get_mut_at(&mut self, addr: Address<S::Node>) -> Option<&mut T>
Returns a mutable reference to the item at the given address.
§Safety
The address’s node must not have been deallocated.
pub fn get<Q: ?Sized>( &self, cmp: impl Fn(&T, &Q) -> Ordering, key: &Q ) -> Option<&T>
pub fn get_mut<Q: ?Sized>( &mut self, cmp: impl Fn(&T, &Q) -> Ordering, key: &Q ) -> Option<&mut T>
pub fn first(&self) -> Option<&T>
pub fn first_mut(&mut self) -> Option<&mut T>
pub fn last(&self) -> Option<&T>
pub fn last_mut(&mut self) -> Option<&mut T>
pub fn iter(&self) -> Iter<'_, T, S> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, T, S> ⓘ
pub fn insert(&mut self, cmp: impl Fn(&T, &T) -> Ordering, item: T) -> Option<T>
sourcepub fn remove<Q: ?Sized>(
&mut self,
cmp: impl Fn(&T, &Q) -> Ordering,
key: &Q
) -> Option<T>
pub fn remove<Q: ?Sized>( &mut self, cmp: impl Fn(&T, &Q) -> Ordering, key: &Q ) -> Option<T>
Remove the next item and return it.
pub fn visit_from_leaves(&self, f: impl FnMut(S::Node))
pub fn visit_from_leaves_mut(&mut self, f: impl FnMut(S::Node, &mut Node<T, S>))
pub fn forget(&mut self)
pub fn clear(&mut self)
pub fn validate(&self, cmp: impl Fn(&T, &T) -> Ordering)
Trait Implementations§
source§impl<'a, T, S: Storage<T>> IntoIterator for &'a RawBTree<T, S>
impl<'a, T, S: Storage<T>> IntoIterator for &'a RawBTree<T, S>
source§impl<'a, T, S: Storage<T>> IntoIterator for &'a mut RawBTree<T, S>
impl<'a, T, S: Storage<T>> IntoIterator for &'a mut RawBTree<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for RawBTree<T, S>
impl<T, S> RefUnwindSafe for RawBTree<T, S>
impl<T, S> Send for RawBTree<T, S>
impl<T, S> Sync for RawBTree<T, S>
impl<T, S> Unpin for RawBTree<T, S>
impl<T, S> UnwindSafe for RawBTree<T, S>
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