pub(crate) fn parse(mut bytes: &[u8]) -> Result<Self, Error> {
        if bytes.len() != 28 {
            return Err(Error::parse_err(format!(
                "invalid length for app info: {} bytes (expected 28)",
                bytes.len()
            )));
        }

        let type_ = bytes.read_u32::<LittleEndian>()?;
        let version = bytes.read_u32::<LittleEndian>()?;
        let capabilities = bytes.read_u32::<LittleEndian>()?;
        let mut product_id = [0; 16];
        product_id.copy_from_slice(bytes);

        Ok(Self {
            type_,
            version,
            capabilities,
            product_id: Uuid::from_bytes(product_id),
        })
    }
/// Parse `AppInfo` from the contents of a corresponding GBL tag.
Parse `AppInfo` from the contents of a corresponding GBL tag.
Parse ` AppInfo ` from the contents of a corresponding GBL tag .
pub(crate) fn parse(mut bytes: &[u8]) -> Result<Self, Error> {
        if bytes.len() != 28 {
            return Err(Error::parse_err(format!(
                "invalid length for app info: {} bytes (expected 28)",
                bytes.len()
            )));
        }
        let type_ = bytes.read_u32::<LittleEndian>()?;
        let version = bytes.read_u32::<LittleEndian>()?;
        let capabilities = bytes.read_u32::<LittleEndian>()?;
        let mut product_id = [0; 16];
        product_id.copy_from_slice(bytes);
        Ok(Self {
            type_,
            version,
            capabilities,
            product_id: Uuid::from_bytes(product_id),
        })
    }
pub ( crate ) fn parse ( mut bytes : & [ u8 ] ) -> Result < Self , Error > { if bytes . len ( ) != 28 { return Err ( Error :: parse_err ( format ! ( " " bytes len ( ) ) ) ) ; } let type_ = bytes . read_u32 :: < LittleEndian > ( ) ? ; let version = bytes . read_u32 :: < LittleEndian > ( ) ? ; let capabilities = bytes . read_u32 :: < LittleEndian > ( ) ? ; let mut product_id = [ 0 ; 16 ] ; product_id . copy_from_slice ( bytes ) ; Ok ( Self { type_ , version , capabilities , product_id : Uuid :: from_bytes ( product_id ) , } ) }
Parse `AppInfo` from the contents of a corresponding GBL tag.
Parse ` AppInfo ` from the contents of a corresponding GBL tag .
bytes
&[u8]