Function svd_parser::optional
source · pub fn optional<T>(
n: &str,
e: &Node<'_, '_>,
config: &T::Config
) -> Result<Option<T::Object>, SVDErrorAt>where
T: Parse<Error = SVDErrorAt>,
Expand description
Parses an optional child element with the provided name and Parse function Returns an none if the child doesn’t exist, Ok(Some(e)) if parsing succeeds, and Err() if parsing fails.