fn parse_uuid(json_uuid: &Value) -> Result<Uuid, Error> {
            let mut byte_list = vec![];

            for byte_string in json_uuid.as_array().unwrap() {
                let raw_value = match i64::from_str_radix(byte_string.as_str().unwrap(), 16) {
                    Ok(v) => v as u8,
                    Err(e) => bail!("Failed to convert raw value with: {:?}", e),
                };
                byte_list.push(raw_value);
            }
            Ok(Uuid { value: byte_list.as_slice().try_into().expect("Failed to set UUID value.") })
        }
/// Parse json input UUID and return Bluetooth UUID format.
///
/// # Arguments
/// * `json_uuid`: The JSON UUID in the form of a list of bytes.
Parse json input UUID and return Bluetooth UUID format.
Parse json input UUID and return Bluetooth UUID format .
fn parse_uuid(json_uuid: &Value) -> Result<Uuid, Error> {
            let mut byte_list = vec![];
            for byte_string in json_uuid.as_array().unwrap() {
                let raw_value = match i64::from_str_radix(byte_string.as_str().unwrap(), 16) {
                    Ok(v) => v as u8,
                    Err(e) => bail!("Failed to convert raw value with: {:?}", e),
                };
                byte_list.push(raw_value);
            }
            Ok(Uuid { value: byte_list.as_slice().try_into().expect("Failed to set UUID value.") })
        }
fn parse_uuid ( json_uuid : & Value ) -> Result < Uuid , Error > { let mut byte_list = vec ! [ ] ; for byte_string in json_uuid . as_array ( ) . unwrap ( ) { let raw_value = match i64 :: from_str_radix ( byte_string . as_str ( ) . unwrap ( ) , 16 ) { Ok ( v ) => v as u8 , Err ( e ) => bail ! ( " " e ) , } ; byte_list . push ( raw_value ) ; } Ok ( Uuid { value : byte_list . as_slice ( ) . try_into ( ) . expect ( " " ) } ) }
Parse json input UUID and return Bluetooth UUID format.
Parse json input UUID and return Bluetooth UUID format .
json_uuid
&Value
json_uuid
&Value