It looks like NodeType::Unexpected is only created when loading a page that has a bad byte for the NodeType.
If we change impl From<u8> for NodeType to a TryFrom, we can remove this NodeType enum option altogether, which will simplify the rest of the library. Unfortunately that does have an impact on pub API.
It looks like
NodeType::Unexpectedis only created when loading a page that has a bad byte for the NodeType.If we change
impl From<u8> for NodeTypeto aTryFrom, we can remove this NodeType enum option altogether, which will simplify the rest of the library. Unfortunately that does have an impact on pub API.