Test using slotmap

This commit is contained in:
Dennis Kobert 2023-06-01 23:50:34 +02:00 committed by Keavon Chambers
parent 95b23ce1af
commit f5fd0a8bd7
20 changed files with 395 additions and 386 deletions

View file

@ -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"

View file

@ -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)]