wip: recoil
This commit is contained in:
1 parent
3cfa1fe125
commit
ee67654f58
31 files changed
+1369
-235
No files matched your search
@@ -0,0 +1,26 @@
|
||||
use crate::{AtomValue, Readable, RecoilItem};
|
||||
|
||||
pub type Atom<T: PartialEq> = fn(&mut AtomBuilder<T>) -> T;
|
||||
|
||||
impl<T: AtomValue + 'static> Readable<T> for Atom<T> {
|
||||
fn load(&'static self) -> RecoilItem {
|
||||
todo!()
|
||||
// RecoilItem::Atom(self as *const _ as _)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AtomBuilder<T: PartialEq> {
|
||||
pub key: String,
|
||||
_never: std::marker::PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T: PartialEq> AtomBuilder<T> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
key: "".to_string(),
|
||||
_never: std::marker::PhantomData {},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_key(&mut self, _key: &'static str) {}
|
||||
}
|
||||
Reference in new issue
Block a user