BTree.put

Adds an element to the tree.

If the tree allows duplicates, this is an insertion; if it doesn't, this is an upsert.

NOTE:

  • Returned pointer may be invalidated by any following insertions or deletions.
  • Allocation failure is irrecoverable in this implementation.
struct BTree(T, BTreeParameters params = BTreeParameters.init, Allocator = Mallocator)
T*
put
(
T x
)

Return Value

Type: T*

A pointer to the stored element, or null in case of insertion failure.