GAT
This commit is contained in:
parent
0ae487e4de
commit
16ea88b644
@ -1,4 +1,5 @@
|
|||||||
#![feature(associated_type_defaults, never_type, unsize, specialization)]
|
#![feature(associated_type_defaults, never_type, unsize, specialization)]
|
||||||
|
#![feature(generic_associated_types)]
|
||||||
|
|
||||||
pub mod convert;
|
pub mod convert;
|
||||||
pub mod engine;
|
pub mod engine;
|
||||||
|
@ -12,10 +12,10 @@ pub trait View<E, CE>
|
|||||||
{
|
{
|
||||||
type InputContext: Context;
|
type InputContext: Context;
|
||||||
type OutputContext: Context;
|
type OutputContext: Context;
|
||||||
type Renderable: Renderable<E>;
|
type Renderable<T: Renderable<CE> + 'static>: Renderable<E>;
|
||||||
|
|
||||||
fn receive_context(&mut self, ctx: Self::InputContext) -> Self::OutputContext;
|
fn receive_context(&mut self, ctx: Self::InputContext) -> Self::OutputContext;
|
||||||
fn build<C: Renderable<CE> + 'static>(self, children: Option<C>) -> Self::Renderable;
|
fn build<C: Renderable<CE> + 'static>(self, children: Option<C>) -> Self::Renderable<C>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// It will have sense when `specialization` will be ready to use
|
// It will have sense when `specialization` will be ready to use
|
||||||
|
Loading…
Reference in New Issue
Block a user