Skip to main content

dope_core/driver/storage/
scope.rs

1use o3::buffer;
2
3use crate::driver::storage;
4
5/// Arenas retained through the complete driver generation and its reclamation.
6#[repr(transparent)]
7pub struct Scope<A>(A);
8
9impl<A: buffer::raw::Arenas> Scope<A> {
10    pub const fn new(arenas: A) -> Self {
11        Self(arenas)
12    }
13
14    pub(in crate::driver) fn into_inner(self) -> A {
15        self.0
16    }
17}
18
19impl<A: buffer::raw::Arenas> storage::Plan for Scope<A> {
20    type Output<'p, 'd>
21        = A::Roots<'d>
22    where
23        Self: 'd,
24        'd: 'p;
25}