pub fn parse_all(data: &'a [u8]) -> Result<Vec<InformationElement<'a>>, Error> {
        let mut ies = vec![];
        let mut slice = data;
        while let Ok(raw) = RawInformationElement::parse(slice) {
            slice = &slice[raw.data.len() + 2..];
            let id = InformationElementId::convert_from(raw.identifier);
            let ie = if let Some(id) = id {
                Self::from(id, raw.data)?
            } else {
                InformationElement::Other(raw)
            };
            ies.push(ie);
        }
        Ok(ies)
    }
/// Parse sloce into a vector of information elements
Parse sloce into a vector of information elements
Parse sloce into a vector of information elements
pub fn parse_all(data: &'a [u8]) -> Result<Vec<InformationElement<'a>>, Error> {
        let mut ies = vec![];
        let mut slice = data;
        while let Ok(raw) = RawInformationElement::parse(slice) {
            slice = &slice[raw.data.len() + 2..];
            let id = InformationElementId::convert_from(raw.identifier);
            let ie = if let Some(id) = id {
                Self::from(id, raw.data)?
            } else {
                InformationElement::Other(raw)
            };
            ies.push(ie);
        }
        Ok(ies)
    }
pub fn parse_all ( data : & ' a [ u8 ] ) -> Result < Vec < InformationElement < ' a > > , Error > { let mut ies = vec ! [ ] ; let mut slice = data ; while let Ok ( raw ) = RawInformationElement :: parse ( slice ) { slice = & slice [ raw . data . len ( ) + 2 .. ] ; let id = InformationElementId :: convert_from ( raw . identifier ) ; let ie = if let Some ( id ) = id { Self :: from ( id , raw . data ) ? } else { InformationElement :: Other ( raw ) } ; ies . push ( ie ) ; } Ok ( ies ) }
Parse sloce into a vector of information elements
Parse sloce into a vector of information elements
data
&'a [u8]
data
&'a [u8]