GAT
This commit is contained in:
parent
0ae487e4de
commit
16ea88b644
@ -1,4 +1,5 @@
|
||||
#![feature(associated_type_defaults, never_type, unsize, specialization)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
pub mod convert;
|
||||
pub mod engine;
|
||||
@ -27,4 +28,4 @@ pub mod prelude {
|
||||
pub use crate::renderable::{Renderable, RenderImplementation, Stub};
|
||||
pub use crate::node::Node;
|
||||
pub use crate::view::View;
|
||||
}
|
||||
}
|
||||
|
@ -12,10 +12,10 @@ pub trait View<E, CE>
|
||||
{
|
||||
type InputContext: 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 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
|
||||
|
Loading…
Reference in New Issue
Block a user