svd_parser/
protection.rs

1use super::*;
2
3impl Parse for crate::svd::Protection {
4    type Object = Self;
5    type Error = SVDErrorAt;
6    type Config = Config;
7
8    fn parse(tree: &Node, _config: &Self::Config) -> Result<Self, Self::Error> {
9        let text = tree.get_text()?;
10
11        Self::parse_str(text).ok_or_else(|| SVDError::InvalidProtection(text.into()).at(tree.id()))
12    }
13}