blob: 349c9def3616ad96336d81b1189501166ce7d672 (
plain) (
tree)
|
|
use crate::helpers::*;
use crate::tutors::abstractions::tutor::Tutor;
use askama::Template;
#[derive(Template)]
#[template(path = "about/index.html")]
pub struct AboutView<T: Tutor> {
tutors: Vec<T>,
}
impl<T: Tutor> AboutView<T> {
pub fn with_tutors(tutors: impl IntoIterator<Item = T>) -> Self {
let mut tutors: Vec<T> = tutors.into_iter().collect();
tutors.sort();
Self { tutors }
}
}
|