wip: component playground; Align primitive

This commit is contained in:
🪞👃🪞 2024-09-07 20:54:49 +03:00
parent 4cca03352a
commit 5fc7da3aca
12 changed files with 181 additions and 42 deletions

View file

@ -1,10 +1,10 @@
use crate::*;
/// A UI component.
pub trait Component<E: Engine>: Render<E> + Handle<E> {}
pub trait Component<E: Engine>: Render<E> + Handle<E> + Layout<E> {}
/// Everything that implements [Render] and [Handle] is a [Component].
impl<E: Engine, C: Render<E> + Handle<E>> Component<E> for C {}
impl<E: Engine, C: Render<E> + Handle<E> + Layout<E>> Component<E> for C {}
/// Marker trait for [Component]s that can [Exit]
pub trait ExitableComponent<E>: Exit + Component<E> where E: Engine {