scopegraphs 0.3.3

A well-documented port of scopegraphs to Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use bumpalo::Bump;

/// Holds data for a [`ScopeGraph`](crate::ScopeGraph). Required to construct a `ScopeGraph`.
///
/// A `ScopeGraph` will use the storage object to allocate in,
/// and lifetimes of items in the scope graph will be tied to an instance of `Storage`.
#[derive(Default)]
pub struct Storage(pub Bump);

impl Storage {
    /// Creates a new storage object.
    pub fn new() -> Self {
        Self(Bump::new())
    }
}