Function rocket::mtls::x509::der::parse_der_set_of_v

source ยท
pub fn parse_der_set_of_v<'a, T, F, E>(f: F) -> impl FnMut(&'a [u8])
where F: FnMut(&'a [u8]) -> Result<(&'a [u8], T), Err<E>>, E: ParseError<&'a [u8]> + From<Error>,
Available on crate feature mtls only.
Expand description

Parse a SET OF object (returning a vec)

Given a subparser for a DER type, parse a set of identical objects.

This differs from parse_der_set_of in the parse function and return type.

/// Read a SET OF INTEGER
fn parser(i:&[u8]) -> BerResult<Vec<DerObject>> {
    parse_der_set_of_v(parse_der_integer)(i)
}

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