pub struct Node<C: TreapMapConfig> {
pub key: C::SearchKey,
pub value: C::Value,
pub sort_key: C::SortKey,
pub weight: C::Weight,
/* private fields */
}
Expand description
A node in a treap-map data structure.
The Node
struct represents a node in a treap-map and contains various
key-value pairs and metadata required for the proper functioning and
maintenance of the treap-map. Direct modification of these fields is not
recommended outside of the TreapMap::update
function, as this function
correctly maintains the integrity of the treap-map.
Fields§
§key: C::SearchKey
The key exposed externally. Used for key-based searches within the treap-map.
value: C::Value
The value stored in the node.
sort_key: C::SortKey
The sorting key for the treap-map. If the type is ()
, the
search_key
is used for sorting.
weight: C::Weight
The weight of the node, used by the treap-map to maintain accumulated weights.
Implementations§
Trait Implementations§
source§impl<C: TreapMapConfig> MallocSizeOf for Node<C>
impl<C: TreapMapConfig> MallocSizeOf for Node<C>
Auto Trait Implementations§
impl<C> RefUnwindSafe for Node<C>where
<C as TreapMapConfig>::SearchKey: RefUnwindSafe,
<C as TreapMapConfig>::SortKey: RefUnwindSafe,
<C as TreapMapConfig>::Value: RefUnwindSafe,
<C as TreapMapConfig>::Weight: RefUnwindSafe,
impl<C> Send for Node<C>where
<C as TreapMapConfig>::SearchKey: Send,
<C as TreapMapConfig>::SortKey: Send,
<C as TreapMapConfig>::Value: Send,
<C as TreapMapConfig>::Weight: Send,
impl<C> Sync for Node<C>where
<C as TreapMapConfig>::SearchKey: Sync,
<C as TreapMapConfig>::SortKey: Sync,
<C as TreapMapConfig>::Value: Sync,
<C as TreapMapConfig>::Weight: Sync,
impl<C> Unpin for Node<C>where
<C as TreapMapConfig>::SearchKey: Unpin,
<C as TreapMapConfig>::SortKey: Unpin,
<C as TreapMapConfig>::Value: Unpin,
<C as TreapMapConfig>::Weight: Unpin,
impl<C> UnwindSafe for Node<C>where
<C as TreapMapConfig>::SearchKey: UnwindSafe,
<C as TreapMapConfig>::SortKey: UnwindSafe,
<C as TreapMapConfig>::Value: UnwindSafe,
<C as TreapMapConfig>::Weight: UnwindSafe,
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