mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Test using slotmap
This commit is contained in:
parent
95b23ce1af
commit
f5fd0a8bd7
20 changed files with 395 additions and 386 deletions
|
@ -27,3 +27,4 @@ anyhow = "1.0.66"
|
|||
xxhash-rust = {workspace = true}
|
||||
ghost-cell = "0.2.3"
|
||||
futures = "0.3.28"
|
||||
slotmap = "1.0.6"
|
||||
|
|
|
@ -13,13 +13,10 @@ use graphene_core::*;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use std::pin::Pin;
|
||||
|
||||
pub type DynFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n>>;
|
||||
pub type Any<'n> = Box<dyn DynAny<'n> + 'n>;
|
||||
pub type FutureAny<'n> = DynFuture<'n, Any<'n>>;
|
||||
pub type TypeErasedNode<'n> = dyn for<'i> NodeIO<Any<'i>, Output = FutureAny<'i>> + 'n;
|
||||
pub type TypeErasedCell<'n> = Arc<TypeErasedNode<'n>>;
|
||||
pub use graphene_core::dyn_exec::*;
|
||||
pub type TypeErasedCell<'n> = Box<TypeErasedNode<'n>>;
|
||||
|
||||
pub type NodeConstructor = for<'i> fn(Vec<TypeErasedCell<'i>>) -> DynFuture<'i, TypeErasedCell<'i>>;
|
||||
pub type NodeConstructor = fn(Vec<TypeErasedCell>) -> DynFuture<'static, TypeErasedCell>;
|
||||
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Default, PartialEq, Clone, Hash, Eq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue