While Note::parse_at returns a Result::Err when there are issues parsing the note it is not a public API and the only way to access it is though NoteIterator::next. Instead of exposing any parsing errors NoteIterator will return None stopping the iteration without any indication that an error has occurred. At the moment iteration can't be continued after parse_at returns Err since offset will have been partially advanced, and it probably doesn't make sense to change this anyway, but I think it would be useful if the iterator sequence was Some(Ok(_)), Some(Err(_)), None.
(Fixing this would require a breaking change)
While
Note::parse_atreturns aResult::Errwhen there are issues parsing the note it is not a public API and the only way to access it is thoughNoteIterator::next. Instead of exposing any parsing errors NoteIterator will return None stopping the iteration without any indication that an error has occurred. At the moment iteration can't be continued afterparse_atreturnsErrsinceoffsetwill have been partially advanced, and it probably doesn't make sense to change this anyway, but I think it would be useful if the iterator sequence wasSome(Ok(_)),Some(Err(_)),None.(Fixing this would require a breaking change)