Trait Runtime

Source
pub trait Runtime<'a, M: From<RadiantSceneMessage> + TryInto<RadiantSceneMessage> + 'a, N: RadiantNode + 'a, R: 'a> {
    type View: View<M, N>;

    // Required methods
    fn view(&self) -> &Self::View;
    fn view_mut(&mut self) -> &mut Self::View;
    fn handle_message(&mut self, message: M) -> Option<R>;

    // Provided methods
    fn scene(&'a self) -> RwLockReadGuard<'_, RadiantScene<M, N>> { ... }
    fn scene_mut(&'a mut self) -> RwLockWriteGuard<'_, RadiantScene<M, N>> { ... }
    fn add(&'a mut self, node: N) { ... }
}

Required Associated Types§

Source

type View: View<M, N>

Required Methods§

Source

fn view(&self) -> &Self::View

Source

fn view_mut(&mut self) -> &mut Self::View

Source

fn handle_message(&mut self, message: M) -> Option<R>

Provided Methods§

Source

fn scene(&'a self) -> RwLockReadGuard<'_, RadiantScene<M, N>>

Source

fn scene_mut(&'a mut self) -> RwLockWriteGuard<'_, RadiantScene<M, N>>

Source

fn add(&'a mut self, node: N)

Implementors§