2023-11-03 22:40:19 +01:00
|
|
|
use std::io;
|
|
|
|
|
2023-11-04 13:49:59 +01:00
|
|
|
use law::LawBuilder;
|
|
|
|
|
2023-11-04 12:14:02 +01:00
|
|
|
mod law;
|
2023-11-04 11:43:35 +01:00
|
|
|
mod overview;
|
2023-11-04 10:07:43 +01:00
|
|
|
mod par;
|
2023-11-03 22:40:19 +01:00
|
|
|
|
2023-11-04 10:07:43 +01:00
|
|
|
#[derive(Debug)]
|
2023-11-03 22:40:19 +01:00
|
|
|
pub struct Error {
|
|
|
|
msg: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<ureq::Error> for Error {
|
|
|
|
fn from(value: ureq::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
impl From<io::Error> for Error {
|
|
|
|
fn from(value: io::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-04 00:05:38 +01:00
|
|
|
impl From<serde_json::Error> for Error {
|
|
|
|
fn from(value: serde_json::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-04 10:07:43 +01:00
|
|
|
impl From<roxmltree::Error> for Error {
|
|
|
|
fn from(value: roxmltree::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-03 22:40:19 +01:00
|
|
|
|
2023-11-03 13:45:25 +01:00
|
|
|
fn main() {
|
2023-11-05 12:46:04 +01:00
|
|
|
env_logger::init();
|
2023-11-06 09:38:58 +01:00
|
|
|
let law = LawBuilder::new("MSchG");
|
2023-11-05 12:46:04 +01:00
|
|
|
|
2023-11-05 22:05:39 +01:00
|
|
|
println!("{:#?}", law);
|
|
|
|
//println!("{:#?}", builder.toc());
|
2023-11-03 13:45:25 +01:00
|
|
|
}
|