Struct rsdb::Radix
[−]
[src]
pub struct Radix<T> { /* fields omitted */ }
A simple lock-free radix tree.
Methods
impl<T> Radix<T>
[src]
fn insert(&self, pid: usize, item: T) -> Result<(), ()>
Try to create a new item in the tree.
fn swap<'s>(&self, pid: usize, new: Ptr<'s, T>, scope: &'s Scope) -> Ptr<'s, T>
Atomically swap the previous value in a tree with a new one.
fn cas<'s>(
&self,
pid: usize,
old: Ptr<'s, T>,
new: Ptr<'s, T>,
scope: &'s Scope
) -> Result<Ptr<'s, T>, Ptr<'s, T>>
&self,
pid: usize,
old: Ptr<'s, T>,
new: Ptr<'s, T>,
scope: &'s Scope
) -> Result<Ptr<'s, T>, Ptr<'s, T>>
Compare and swap an old value to a new one.
fn get<'s>(&self, pid: usize, scope: &'s Scope) -> Option<Ptr<'s, T>>
Try to get a value from the tree.
fn del(&self, pid: usize)
Delete a value from the tree, returning the old value.