fn take_constructed_cer<S: decode::Source>(
        constructed: &mut decode::Constructed<S>
    ) -> Result<Self, S::Err> {
        let mut short = false;
        constructed.capture(|con| {
            while let Some(()) = con.take_opt_primitive_if(Tag::OCTET_STRING,
                                                           |primitive| {
                if primitive.remaining() > 1000 {
                    xerr!(return Err(decode::Error::Malformed.into()));
                }
                if primitive.remaining() < 1000 {
                    if short {
                        xerr!(return Err(decode::Error::Malformed.into()));
                    }
                    short = true
                }
                primitive.skip_all()
            })? { }
            Ok(())
        }).map(|captured| OctetString(Inner::Constructed(captured)))
    }
/// Parses a constructed CER encoded octet string.
///
/// The constructed form contains a sequence of primitive OCTET STRING
/// values each except for the last one exactly 1000 octets long.
Parses a constructed CER encoded octet string.
The constructed form contains a sequence of primitive OCTET STRING
values each except for the last one exactly 1000 octets long.
Parses a constructed CER encoded octet string . The constructed form contains a sequence of primitive OCTET STRING values each except for the last one exactly 1000 octets long .
fn take_constructed_cer<S: decode::Source>(
        constructed: &mut decode::Constructed<S>
    ) -> Result<Self, S::Err> {
        let mut short = false;
        constructed.capture(|con| {
            while let Some(()) = con.take_opt_primitive_if(Tag::OCTET_STRING,
                                                           |primitive| {
                if primitive.remaining() > 1000 {
                    xerr!(return Err(decode::Error::Malformed.into()));
                }
                if primitive.remaining() < 1000 {
                    if short {
                        xerr!(return Err(decode::Error::Malformed.into()));
                    }
                    short = true
                }
                primitive.skip_all()
            })? { }
            Ok(())
        }).map(|captured| OctetString(Inner::Constructed(captured)))
    }
fn take_constructed_cer < S : decode :: Source > ( constructed : & mut decode :: Constructed < S > ) -> Result < Self , S :: Err > { let mut short = false ; constructed . capture ( | con | { while let Some ( ( ) ) = con . take_opt_primitive_if ( Tag :: OCTET_STRING , | primitive | { if primitive . remaining ( ) > 1000 { xerr ! ( return Err ( decode Error Malformed into ( ) ) ) ; } if primitive . remaining ( ) < 1000 { if short { xerr ! ( return Err ( decode Error Malformed into ( ) ) ) ; } short = true } primitive . skip_all ( ) } ) ? { } Ok ( ( ) ) } ) . map ( | captured | OctetString ( Inner :: Constructed ( captured ) ) ) }
Parses a constructed CER encoded octet string.
Parses a constructed CER encoded octet string .
constructed
&mut decode::Constructed<S>
constructed
&mut decode::Constructed<S>