dachterasse 0.1.4

A crate for scraping the HPI lecture overview site
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{StaticDegree, Lecture};

pub type Error = String;

pub type LoadResult = Result<Vec<Lecture>, Error>;
pub type SaveResult = Result<(), Error>;

pub trait ReadOnlyDataSource: Send + Sync {
    fn load_lectures(&self, degree: &'static StaticDegree) -> LoadResult;
}

pub trait ReadWriteDataSource: ReadOnlyDataSource {
    fn save_lectures(&mut self, degree: &'static StaticDegree, lectures: &[Lecture]) -> SaveResult;
}