Struct diskvec::DiskVec [] [src]

pub struct DiskVec<T: Volatile> { /* fields omitted */ }

A concurrent on-disk vector for storing and manipulating Volatile types

Limitations

  • A value read from the diskarray might have been corrupted by faulty writes. For this reason, it is recommended that T carries its own checksum capability.
  • Write locks are done with a finite amount of mutexes, that may be less than the amount of elements in the vector, so deadlocks are possible even if you try to obtain mutable references to two different index positions.
  • Since reads are lock-free, there is no guarantee that the value you're holding a reference to will not change behind your back.

Guarantees

  • Writes are done using locks, so no writes will trample each other.

Methods

impl<T: Volatile> DiskVec<T>
[src]

[src]

Construct a new DiskVec given a path.

[src]

Get a reference to the value at index

[src]

Get a mutable reference to the value at index

[src]

returns the length of the DiskVec

[src]

Pushes an element to the DiskVec, returning the new index.

Trait Implementations

impl<T: Volatile> Sync for DiskVec<T>
[src]

impl<T: Volatile> Send for DiskVec<T>
[src]