partway towards commands
I got very confused and started mucking about with "spawn" when in fact all I needed was the "inline" extension type in orcx that allows the interpreter to expose custom constants.
This commit is contained in:
@@ -2,7 +2,7 @@ use std::any::Any;
|
||||
use std::fmt::Debug;
|
||||
use std::sync::Arc;
|
||||
|
||||
use orchid_base::boxed_iter::{BoxedIter, box_empty, box_once};
|
||||
use orchid_base::{BoxedIter, box_empty, box_once};
|
||||
use ordered_float::NotNan;
|
||||
|
||||
use crate::api;
|
||||
@@ -17,7 +17,7 @@ pub struct Cted<Ctor: SystemCtor + ?Sized> {
|
||||
impl<C: SystemCtor + ?Sized> Clone for Cted<C> {
|
||||
fn clone(&self) -> Self { Self { deps: self.deps.clone(), inst: self.inst.clone() } }
|
||||
}
|
||||
pub trait DynCted: Debug + Send + Sync + 'static {
|
||||
pub trait DynCted: Debug + 'static {
|
||||
fn as_any(&self) -> &dyn Any;
|
||||
fn deps<'a>(&'a self) -> BoxedIter<'a, &'a (dyn DynSystemHandle + 'a)>;
|
||||
fn inst(&self) -> Arc<dyn DynSystem>;
|
||||
@@ -29,7 +29,7 @@ impl<C: SystemCtor + ?Sized> DynCted for Cted<C> {
|
||||
}
|
||||
pub type CtedObj = Arc<dyn DynCted>;
|
||||
|
||||
pub trait DepSat: Debug + Clone + Send + Sync + 'static {
|
||||
pub trait DepSat: Debug + Clone + 'static {
|
||||
fn iter<'a>(&'a self) -> BoxedIter<'a, &'a (dyn DynSystemHandle + 'a)>;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ impl DepDef for () {
|
||||
fn report(_: &mut impl FnMut(&'static str)) {}
|
||||
}
|
||||
|
||||
pub trait SystemCtor: Debug + Send + Sync + 'static {
|
||||
pub trait SystemCtor: Debug + 'static {
|
||||
type Deps: DepDef;
|
||||
type Instance: System;
|
||||
const NAME: &'static str;
|
||||
@@ -68,7 +68,7 @@ pub trait SystemCtor: Debug + Send + Sync + 'static {
|
||||
fn inst(&self, deps: <Self::Deps as DepDef>::Sat) -> Self::Instance;
|
||||
}
|
||||
|
||||
pub trait DynSystemCtor: Debug + Send + Sync + 'static {
|
||||
pub trait DynSystemCtor: Debug + 'static {
|
||||
fn decl(&self, id: api::SysDeclId) -> api::SystemDecl;
|
||||
fn new_system(&self, new: &api::NewSystem) -> CtedObj;
|
||||
}
|
||||
@@ -91,8 +91,7 @@ impl<T: SystemCtor> DynSystemCtor for T {
|
||||
}
|
||||
|
||||
mod dep_set_tuple_impls {
|
||||
use orchid_base::box_chain;
|
||||
use orchid_base::boxed_iter::BoxedIter;
|
||||
use orchid_base::{BoxedIter, box_chain};
|
||||
use pastey::paste;
|
||||
|
||||
use super::{DepDef, DepSat};
|
||||
|
||||
Reference in New Issue
Block a user