Expand description
arae
provides Cursed
, a trait for types that provide the ability to access
their elements given a Cursor
.
§Example
use arae::{CurVec, CursedExt, Bounded};
// Create a new `CurVec` of length 10 with the elements
// initialized via `Default::default`.
let mut vec = CurVec::new_with_default(10);
// Create two cursors pointing the the head of the vec.
let write_cursor = vec.head();
let read_cursor = vec.head();
*vec.get_mut(write_cursor) = 1;
assert_eq!(*vec.get(read_cursor), 1);
Modules§
Structs§
- Atomic
Cursor - An atomic wrapper around a
Cursor
. - CurVec
- A heap-allocated, fixed-size, array of values in contiguous memory designed
for efficient access via
Cursor
s. - Cursor
- An structure that represents a location within a
Cursed
structure.
Traits§
- AsCursor
AsCursor
is for simpleCursed
owners where it makes sense to be able to return a singleCursor
.- Bounded
Bounded
types areCursed
Sequence
s that know theirhead
andtail
locations.- Contiguous
Contiguous
types areBounded
Sequence
s that guarantee elements reside next to each other in memory (ie.[T]
).- Cursed
Cursed
types provide the ability to access their elements viaCursor
s.- Cursed
Ext - Extended functionality for implementations of
Cursed
. - Sequence
Sequence
types areCursed
types that provide the ability to move forwards and backwards through their elements.