use super::Template; pub enum View { Index, Login, } impl Template for View { fn template(&self) -> &'static str { match self { Self::Index => "views/index.html", Self::Login => "views/login.html", } } fn render(&self, tera: &tera::Tera) -> tera::Result { tera.render(self.template(), &tera::Context::new()) } }