wip: removing Render and Layout from core

This commit is contained in:
🪞👃🪞 2024-09-09 15:12:34 +03:00
parent c4a5ee7b6e
commit eeb323b742
11 changed files with 148 additions and 165 deletions

View file

@ -16,13 +16,13 @@ pub trait Device<E: Engine>: Component<E> + Process {
}
/// All things that implement the required traits can be treated as `Device`.
impl<D, E: Engine> Device<E> for D where D: Component<E> + Process {}
impl<E: Engine, W: Widget<Engine = E> + Process> Device<E> for W {}
impl<'a, E: Engine> Render<E> for Box<dyn Device<E> + 'a> {
fn render (&self, to: &mut E) -> Perhaps<E::Rendered> {
(**self).render(to)
}
}
//impl<'a, E: Engine> Render<E> for Box<dyn Device<E> + 'a> {
//fn render (&self, to: &mut E) -> Perhaps<E::Rendered> {
//(**self).render(to)
//}
//}
/// Wraps [Client] or [DynamicAsyncClient] in place.
pub enum JackClient {