pub struct Art { /* private fields */ }

Implementations

Returns a copy of the value corresponding to the key.

Examples
use con_art_rust::Art;
let tree = Art::new();
let guard = tree.pin();

tree.insert(1, 42, &guard);
assert_eq!(tree.get(&1, &guard).unwrap(), 42);

Enters an epoch. Note: this can be expensive, try to reuse it.

Examples
use con_art_rust::Art;
let tree = Art::new();
let guard = tree.pin();

Create an empty ART tree.

Examples
use con_art_rust::Art;
let tree = Art::new();

Removes key-value pair from the tree.

Examples
use con_art_rust::Art;
let tree = Art::new();
let guard = tree.pin();

tree.insert(1, 42, &guard);
tree.remove(&1, &guard);
assert!(tree.get(&1, &guard).is_none());

Insert a key-value pair to the tree.

Examples
use con_art_rust::Art;
let tree = Art::new();
let guard = tree.pin();

tree.insert(1, 42, &guard);
assert_eq!(tree.get(&1, &guard).unwrap(), 42);

Scan the tree with the range of [start, end], write the result to the result buffer. It scans the length of result or the number of the keys within the range, whichever is smaller; returns the number of the keys scanned.

Examples
use con_art_rust::Art;
let tree = Art::new();
let guard = tree.pin();

tree.insert(1, 42, &guard);

let low_key = 1;
let high_key = 2;
let mut result = [0; 2];
let scanned = tree.range(&low_key, &high_key, &mut result, &guard);
assert_eq!(scanned.unwrap(), 1);
assert_eq!(result, [42, 0]);

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.