pub fn parse_ber_sequence_of<'a, F>(
    f: F
) -> impl FnMut(&'a [u8]) -> BerResult<'_>
where F: Fn(&'a [u8]) -> BerResult<'_>,
Expand description

Parse a SEQUENCE OF object

Given a subparser for a BER type, parse a sequence of identical objects.

/// Read a SEQUENCE OF INTEGER
fn parser(i:&[u8]) -> BerResult<BerObject> {
    parse_ber_sequence_of(parse_ber_integer)(i)
}

let (rem, v) = parser(&bytes).expect("parsing failed");