Feat: Clean up repo a bit
This commit is contained in:
1 parent
c28697e1fe
commit
a99147c85b
55 files changed
+76
-6609
No files matched your search
@@ -0,0 +1,48 @@
|
||||
use std::{cell::UnsafeCell, collections::HashMap};
|
||||
|
||||
use generational_arena::Arena;
|
||||
|
||||
use crate::innerlude::*;
|
||||
|
||||
pub struct ScopeArena {
|
||||
pub(crate) arena: UnsafeCell<Arena<Scope>>,
|
||||
locks: HashMap<ScopeIdx, MutStatus>,
|
||||
}
|
||||
|
||||
enum MutStatus {
|
||||
Immut,
|
||||
Mut,
|
||||
}
|
||||
|
||||
impl ScopeArena {
|
||||
pub fn new(arena: Arena<Scope>) -> Self {
|
||||
Self {
|
||||
arena: UnsafeCell::new(arena),
|
||||
locks: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get(&self, idx: ScopeIdx) -> Result<&Scope> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn get_mut(&self, idx: ScopeIdx) -> Result<&Scope> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn inner(&self) -> &Arena<Scope> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn inner_mut(&mut self) -> &mut Arena<Scope> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn with<T>(&mut self, f: impl FnOnce(&mut Arena<Scope>) -> T) -> T {
|
||||
todo!()
|
||||
}
|
||||
|
||||
unsafe fn inner_unchecked<'s>() -> &'s mut Arena<Scope> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user