1 2 3 4 5 6 7 8 9 10 11 12 13 14
//! //! Renderer Trait for Rendering Systems //! use std::fmt::Debug; use std::sync::{Arc, RwLock}; /// Rendering Engine Trait pub trait Renderer<WORLD: Send + Sync + 'static>: Send + Sync { type Error: Debug; /// Render the necessary contents of the world fn render(&mut self, world: Arc<RwLock<WORLD>>) -> Result<(), Self::Error>; }