1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pub use r#staticStaticStorage;
pub use DynamicStorage;
/// A fixed-layout collection of elements that algorithms in this crate read from.
///
/// Defines the minimal capability the algorithm layer needs: element access and a length,
/// independent of whether the backing memory lives on the stack or the heap. Kept
/// intentionally minimal so algorithms written against it work the same way regardless of
/// storage strategy, without exposing anything storage-specific that would leak into the
/// generic algorithm layer above it.
///
/// # Examples
///
/// ```
/// use rustebra::storage::Storage;
///
/// fn first<S: Storage>(storage: &S) -> Option<&S::Item> {
/// storage.get(0)
/// }
/// ```