use crate::helpers::*; use crate::posts::abstractions::post::Post; use askama::Template; #[derive(Template)] #[template(path = "posts.html")] pub struct PostsView { posts: Vec

, } impl PostsView

{ pub fn with_posts(posts: impl IntoIterator) -> Self { Self { posts: posts.into_iter().collect(), } } }