use crate::*; /// Collection of view definitions. pub type Views = Arc, Arc>>>; pub(crate) fn load_view (views: &Views, name: &impl AsRef, body: &impl Language) -> Usually<()> { views.write().unwrap().insert(name.as_ref().into(), body.src()?.unwrap_or_default().into()); Ok(()) }