Struct bitmaptrie::BorrowSync [] [src]

pub struct BorrowSync<'a, T: 'a> {
    // some fields omitted
}

Borrows a Trie mutably, exposing a Sync-safe subset of it's methods. No structure modifying methods are included. Each borrow gets it's own path cache. The lifetime of this type is the lifetime of the mutable borrow. This can be used to parallelize structure-immutant changes.

Methods

impl<'a, T> BorrowSync<'a, T>
[src]

fn clone(&self) -> BorrowSync<'a, T>

Clone this instance: the new instance can be sent to another thread. It has it's own path cache.

fn get(&self, index: usize) -> Option<&'a T>

Retrieve a reference to the value at the given index. Updates the local path cache to point at this index.

fn get_mut(&mut self, index: usize) -> Option<&'a mut T>

Retrieve a mutable reference to the value at the given index. Updates the local path cache to point at this index. [Is this actually Sync-safe?]

Trait Implementations

impl<'a, T: Send + Sync> Send for BorrowSync<'a, T>
[src]

impl<'a, T> Drop for BorrowSync<'a, T>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more