pub fn encode_progress(
            &self,
            lower: &[i64],
            upper: &[i64],
            counts: &[(i64, i64)],
        ) -> Value {
            let enc_lower = Value::Array(lower.iter().cloned().map(Value::Long).collect());
            let enc_upper = Value::Array(upper.iter().cloned().map(Value::Long).collect());
            let enc_counts = Value::Array(
                counts
                    .iter()
                    .map(|(time, count)| {
                        Value::Record(vec![
                            ("time".to_string(), Value::Long(time.clone())),
                            ("count".to_string(), Value::Long(count.clone())),
                        ])
                    })
                    .collect(),
            );
            let enc_progress = Value::Record(vec![
                ("lower".to_string(), enc_lower),
                ("upper".to_string(), enc_upper),
                ("counts".to_string(), enc_counts),
            ]);

            Value::Union {
                index: 1,
                inner: Box::new(enc_progress),
                n_variants: 2,
                null_variant: None,
            }
        }
/// Encodes the contents of a progress statement as an Avro value.
Encodes the contents of a progress statement as an Avro value.
Encodes the contents of a progress statement as an Avro value .
pub fn encode_progress(
            &self,
            lower: &[i64],
            upper: &[i64],
            counts: &[(i64, i64)],
        ) -> Value {
            let enc_lower = Value::Array(lower.iter().cloned().map(Value::Long).collect());
            let enc_upper = Value::Array(upper.iter().cloned().map(Value::Long).collect());
            let enc_counts = Value::Array(
                counts
                    .iter()
                    .map(|(time, count)| {
                        Value::Record(vec![
                            ("time".to_string(), Value::Long(time.clone())),
                            ("count".to_string(), Value::Long(count.clone())),
                        ])
                    })
                    .collect(),
            );
            let enc_progress = Value::Record(vec![
                ("lower".to_string(), enc_lower),
                ("upper".to_string(), enc_upper),
                ("counts".to_string(), enc_counts),
            ]);
            Value::Union {
                index: 1,
                inner: Box::new(enc_progress),
                n_variants: 2,
                null_variant: None,
            }
        }
pub fn encode_progress ( & self , lower : & [ i64 ] , upper : & [ i64 ] , counts : & [ ( i64 , i64 ) ] , ) -> Value { let enc_lower = Value :: Array ( lower . iter ( ) . cloned ( ) . map ( Value :: Long ) . collect ( ) ) ; let enc_upper = Value :: Array ( upper . iter ( ) . cloned ( ) . map ( Value :: Long ) . collect ( ) ) ; let enc_counts = Value :: Array ( counts . iter ( ) . map ( | ( time , count ) | { Value :: Record ( vec ! [ ( " " to_string ( ) Value Long ( time clone ( ) ) ) ( " " to_string ( ) Value Long ( count clone ( ) ) ) ] ) } ) . collect ( ) , ) ; let enc_progress = Value :: Record ( vec ! [ ( " " to_string ( ) enc_lower ) ( " " to_string ( ) enc_upper ) ( " " to_string ( ) enc_counts ) ] ) ; Value :: Union { index : 1 , inner : Box :: new ( enc_progress ) , n_variants : 2 , null_variant : None , } }
Encodes the contents of a progress statement as an Avro value.
Encodes the contents of a progress statement as an Avro value .
&self
lower
&[i64]
upper
&[i64]
counts
&[(i64, i64)]
&self
lower
&[i64]
upper
&[i64]
counts
&[(i64, i64)]