Skip to main content

NodeHandle

Struct NodeHandle 

Source
pub struct NodeHandle<K: Ord + Clone, V: Clone, const SIZE: usize>(/* private fields */);
Expand description

An owned node, built by create or kept from a NodeRef. A map is assembled from handles with Map::from_root.

Implementations§

Source§

impl<K: Ord + Clone, V: Clone, const SIZE: usize> NodeHandle<K, V, SIZE>

Source

pub fn view(&self) -> NodeRef<'_, K, V, SIZE>

Source

pub unsafe fn create<I: IntoIterator<Item = (K, V)>>( left: Option<Self>, pairs: I, right: Option<Self>, ) -> Self

A node holding pairs above left and below right.

§Safety

The arguments must describe a node the map could have built, exactly as a NodeRef reported it: between one and SIZE pairs in strictly increasing key order, every key of left below them and every key of right above, and the subtrees’ heights within two of each other. Nothing is checked; a map over a node that breaks these is wrong in lookups and updates.

Trait Implementations§

Source§

impl<K: Ord + Clone, V: Clone, const SIZE: usize> Clone for NodeHandle<K, V, SIZE>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K: Ord + Clone, V: Clone, const SIZE: usize> Debug for NodeHandle<K, V, SIZE>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<K, V, const SIZE: usize> Freeze for NodeHandle<K, V, SIZE>
where Node<K, V, SIZE>: Freeze,

§

impl<K, V, const SIZE: usize> RefUnwindSafe for NodeHandle<K, V, SIZE>
where Node<K, V, SIZE>: RefUnwindSafe,

§

impl<K, V, const SIZE: usize> Send for NodeHandle<K, V, SIZE>
where Node<K, V, SIZE>: Send,

§

impl<K, V, const SIZE: usize> Sync for NodeHandle<K, V, SIZE>
where Node<K, V, SIZE>: Sync,

§

impl<K, V, const SIZE: usize> Unpin for NodeHandle<K, V, SIZE>
where Node<K, V, SIZE>: Unpin,

§

impl<K, V, const SIZE: usize> UnsafeUnpin for NodeHandle<K, V, SIZE>
where Node<K, V, SIZE>: UnsafeUnpin,

§

impl<K, V, const SIZE: usize> UnwindSafe for NodeHandle<K, V, SIZE>
where Node<K, V, SIZE>: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.