pub fn encode_updates(&self, updates: &[(Row, i64, i64)]) -> Value {
            let mut enc_updates = Vec::new();
            for (data, time, diff) in updates {
                let enc_data = encode_datums_as_avro(&**data, &self.columns);
                let enc_time = Value::Long(time.clone());
                let enc_diff = Value::Long(diff.clone());
                enc_updates.push(Value::Record(vec![
                    ("data".to_string(), enc_data),
                    ("time".to_string(), enc_time),
                    ("diff".to_string(), enc_diff),
                ]));
            }
            Value::Union {
                index: 0,
                inner: Box::new(Value::Array(enc_updates)),
                n_variants: 2,
                null_variant: None,
            }
        }
/// Encodes a batch of updates as an Avro value.
Encodes a batch of updates as an Avro value.
Encodes a batch of updates as an Avro value .
pub fn encode_updates(&self, updates: &[(Row, i64, i64)]) -> Value {
            let mut enc_updates = Vec::new();
            for (data, time, diff) in updates {
                let enc_data = encode_datums_as_avro(&**data, &self.columns);
                let enc_time = Value::Long(time.clone());
                let enc_diff = Value::Long(diff.clone());
                enc_updates.push(Value::Record(vec![
                    ("data".to_string(), enc_data),
                    ("time".to_string(), enc_time),
                    ("diff".to_string(), enc_diff),
                ]));
            }
            Value::Union {
                index: 0,
                inner: Box::new(Value::Array(enc_updates)),
                n_variants: 2,
                null_variant: None,
            }
        }
pub fn encode_updates ( & self , updates : & [ ( Row , i64 , i64 ) ] ) -> Value { let mut enc_updates = Vec :: new ( ) ; for ( data , time , diff ) in updates { let enc_data = encode_datums_as_avro ( & * * data , & self . columns ) ; let enc_time = Value :: Long ( time . clone ( ) ) ; let enc_diff = Value :: Long ( diff . clone ( ) ) ; enc_updates . push ( Value :: Record ( vec ! [ ( " " to_string ( ) enc_data ) ( " " to_string ( ) enc_time ) ( " " to_string ( ) enc_diff ) ] ) ) ; } Value :: Union { index : 0 , inner : Box :: new ( Value :: Array ( enc_updates ) ) , n_variants : 2 , null_variant : None , } }
Encodes a batch of updates as an Avro value.
Encodes a batch of updates as an Avro value .
&self
updates
&[(Row, i64, i64)]
&self
updates
&[(Row, i64, i64)]