util.rs
1use minidom::Element;
2
3pub trait FromElement where Self: Sized {
4 type Err;
5
6 fn from_element(elem: &Element) -> Result<Self, Self::Err>;
7}
8
9pub trait FromParentElement where Self: Sized {
10 type Err;
11
12 fn from_parent_element(elem: &Element) -> Result<Self, Self::Err>;
13}
14
15pub trait ToElement where Self: Sized {
16 type Err;
17
18 fn to_element(&self) -> Result<Element, Self::Err>;
19}