[][src]Struct pagecache::PageTable

pub struct PageTable<T> where
    T: 'static + Send + Sync
{ /* fields omitted */ }

A simple lock-free radix tree.

Methods

impl<T> PageTable<T> where
    T: 'static + Send + Sync
[src]

pub fn swap<'g>(
    &self,
    pid: u64,
    new: Shared<'g, T>,
    guard: &'g Guard
) -> Shared<'g, T>
[src]

Atomically swap the previous value in a tree with a new one.

pub fn cas<'g>(
    &self,
    pid: u64,
    old: Shared<'g, T>,
    new: Shared<'g, T>,
    guard: &'g Guard
) -> Result<Shared<'g, T>, Shared<'g, T>>
[src]

Compare and swap an old value to a new one.

pub fn get<'g>(&self, pid: u64, guard: &'g Guard) -> Option<Shared<'g, T>>[src]

Try to get a value from the tree.

pub fn del<'g>(&self, pid: u64, guard: &'g Guard) -> Option<Shared<'g, T>>[src]

Delete a value from the tree, returning the old value if it was set.

Trait Implementations

impl<T> Drop for PageTable<T> where
    T: 'static + Send + Sync
[src]

impl<T> Default for PageTable<T> where
    T: 'static + Send + Sync
[src]

Auto Trait Implementations

impl<T> Send for PageTable<T>

impl<T> Sync for PageTable<T>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]