nml2 0.3.1

Convert nmlcc neuro science components into Arbor data formats
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(clippy::upper_case_acronyms)]

use roxmltree::Node;

pub trait XML {
    fn from_node(node: &Node) -> Self;
}

impl XML for String {
    fn from_node(node: &Node) -> Self {
        node.text()
            .unwrap_or_else(|| panic!("Illegal conversion {node:?} -> String"))
            .to_string()
    }
}