fn next_primitive(&mut self) -> Option<Bytes> {
        while !self.remainder.is_empty() {
            let (tag, cons) = Tag::take_from(&mut self.remainder).unwrap();
            let length = Length::take_from(
                &mut self.remainder, Mode::Ber
            ).unwrap();
            match tag {
                Tag::OCTET_STRING => {
                    if cons {
                        continue
                    }
                    let length = match length {
                        Length::Definite(len) => len,
                        _ => unreachable!()
                    };
                    return Some(self.remainder.split_to(length))
                }
                Tag::END_OF_VALUE => continue,
                _ => unreachable!()
            }
        }
        None
    }
/// Returns the bytes of the next primitive value in the string.
///
/// Returns `None` if we are done.
Returns the bytes of the next primitive value in the string.
Returns `None` if we are done.
Returns the bytes of the next primitive value in the string . Returns ` None ` if we are done .
fn next_primitive(&mut self) -> Option<Bytes> {
        while !self.remainder.is_empty() {
            let (tag, cons) = Tag::take_from(&mut self.remainder).unwrap();
            let length = Length::take_from(
                &mut self.remainder, Mode::Ber
            ).unwrap();
            match tag {
                Tag::OCTET_STRING => {
                    if cons {
                        continue
                    }
                    let length = match length {
                        Length::Definite(len) => len,
                        _ => unreachable!()
                    };
                    return Some(self.remainder.split_to(length))
                }
                Tag::END_OF_VALUE => continue,
                _ => unreachable!()
            }
        }
        None
    }
fn next_primitive ( & mut self ) -> Option < Bytes > { while ! self . remainder . is_empty ( ) { let ( tag , cons ) = Tag :: take_from ( & mut self . remainder ) . unwrap ( ) ; let length = Length :: take_from ( & mut self . remainder , Mode :: Ber ) . unwrap ( ) ; match tag { Tag :: OCTET_STRING => { if cons { continue } let length = match length { Length :: Definite ( len ) => len , _ => unreachable ! ( ) } ; return Some ( self . remainder . split_to ( length ) ) } Tag :: END_OF_VALUE => continue , _ => unreachable ! ( ) } } None }
Returns the bytes of the next primitive value in the string.
Returns the bytes of the next primitive value in the string .
&mut self
&mut self