Function der_parser::ber::parse_ber_sequence_of_v [−][src]
pub fn parse_ber_sequence_of_v<'a, T, F, E>(
f: F
) -> impl FnMut(&'a [u8]) -> IResult<&'a [u8], Vec<T>, E> where
F: FnMut(&'a [u8]) -> IResult<&'a [u8], T, E>,
E: ParseError<&'a [u8]> + From<BerError>,
Expand description
Parse a SEQUENCE OF object (returning a vec)
Given a subparser for a BER type, parse a sequence of identical objects.
This differs from parse_ber_sequence_of
in the parse function and return type.
/// Read a SEQUENCE OF INTEGER fn parser(i:&[u8]) -> BerResult<Vec<BerObject>> { parse_ber_sequence_of_v(parse_ber_integer)(i) } let (rem, v) = parser(&bytes).expect("parsing failed");