47 lines
833 B
Rust
47 lines
833 B
Rust
use std::io;
|
|
|
|
use law::LawBuilder;
|
|
|
|
mod law;
|
|
mod overview;
|
|
mod par;
|
|
|
|
#[derive(Debug)]
|
|
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(),
|
|
}
|
|
}
|
|
}
|
|
impl From<serde_json::Error> for Error {
|
|
fn from(value: serde_json::Error) -> Self {
|
|
Self {
|
|
msg: value.to_string(),
|
|
}
|
|
}
|
|
}
|
|
impl From<roxmltree::Error> for Error {
|
|
fn from(value: roxmltree::Error) -> Self {
|
|
Self {
|
|
msg: value.to_string(),
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let mut law = LawBuilder::new("UrhG");
|
|
//overview::parse(10001899).unwrap(); //TEG
|
|
}
|