polyhorn_core/
platform.rs1use std::hash::Hash;
2
3use super::{CommandBuffer, Component, Compositor, Container, Disposable, EventLoop};
4
5pub trait Platform: 'static {
7 type ContainerID: Copy + Eq + Hash + Send;
10
11 type Container: Container<Self>;
15
16 type Component: Component<Self>;
17
18 type Compositor: Compositor<Self>;
19
20 type CommandBuffer: CommandBuffer<Self>;
21
22 type Environment;
23
24 fn with_compositor<F>(container: Self::Container, task: F) -> Disposable
25 where
26 F: FnOnce(Self::ContainerID, Self::Compositor, EventLoop) -> Disposable + Send + 'static;
27}