-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
337 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
pub enum ListIterator4<I0, I1, I2, I3> { | ||
Variant0(I0), | ||
Variant1(I1), | ||
Variant2(I2), | ||
Variant3(I3), | ||
} | ||
|
||
impl<I0, I1, I2, I3> Iterator for ListIterator4<I0, I1, I2, I3> | ||
where | ||
I0: Iterator, | ||
I1: Iterator<Item = I0::Item>, | ||
I2: Iterator<Item = I0::Item>, | ||
I3: Iterator<Item = I0::Item>, | ||
{ | ||
type Item = I0::Item; | ||
|
||
fn next(&mut self) -> Option<Self::Item> { | ||
match self { | ||
ListIterator4::Variant0(iter) => iter.next(), | ||
ListIterator4::Variant1(iter) => iter.next(), | ||
ListIterator4::Variant2(iter) => iter.next(), | ||
ListIterator4::Variant3(iter) => iter.next(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -415,6 +415,7 @@ | |
|
||
mod constant; | ||
mod context; | ||
mod iterator; | ||
mod syn_ext; | ||
|
||
use constant::evaluate_usize; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#![allow(unused)] | ||
use typle::typle; | ||
|
||
struct World {} | ||
|
||
trait ExclusiveSystemParam {} | ||
|
||
struct ExclusiveSystemParamItem<F> { | ||
f: F, | ||
} | ||
|
||
trait ExclusiveSystemParamFunction<F> { | ||
type In; | ||
type Out; | ||
type Param; | ||
|
||
fn run( | ||
&mut self, | ||
world: &mut World, | ||
_in: Self::In, | ||
param_value: ExclusiveSystemParamItem<Self::Param>, | ||
) -> Self::Out; | ||
} | ||
|
||
struct Func {} | ||
|
||
// https://github.com/jongiddy/bevy/blob/ac91b191/crates/bevy_ecs/src/system/exclusive_function_system.rs#L183 | ||
#[typle(Tuple for 0..=3)] | ||
impl<Out, Func: Send + Sync + 'static, F: Tuple> ExclusiveSystemParamFunction<fn(F<{ .. }>) -> Out> | ||
for Func | ||
where | ||
for<'a> &'a mut Func: FnMut(&mut World, F<{ .. }>) -> Out | ||
+ FnMut(&mut World, typle_args!(i in .. => ExclusiveSystemParamItem<F<{i}>>)) -> Out, | ||
Out: 'static, | ||
F<_>: ExclusiveSystemParam, | ||
{ | ||
type In = (); | ||
type Out = Out; | ||
type Param = F; | ||
#[inline] | ||
fn run( | ||
&mut self, | ||
world: &mut World, | ||
_in: (), | ||
param_value: ExclusiveSystemParamItem<F>, | ||
) -> Self::Out { | ||
todo!() | ||
} | ||
} |