pub type Record = Vec<(String, AvroValue)>;
Expand description
A schema-less Avro record value.
Aliased Type§
struct Record { /* private fields */ }
Trait Implementations§
source§impl AvroRecordExt for Record
impl AvroRecordExt for Record
source§fn get_bool(&self, key: &str) -> Option<bool>
fn get_bool(&self, key: &str) -> Option<bool>
Extracts the boolean value corresponding to the key.
source§fn get_i32(&self, key: &str) -> Option<i32>
fn get_i32(&self, key: &str) -> Option<i32>
Extracts the integer value corresponding to the key.
source§fn get_i64(&self, key: &str) -> Option<i64>
fn get_i64(&self, key: &str) -> Option<i64>
Extracts the
Long
integer value corresponding to the key.source§fn get_u16(&self, key: &str) -> Option<u16>
fn get_u16(&self, key: &str) -> Option<u16>
Extracts the integer value corresponding to the key and
represents it as
u16
if possible.source§fn get_u32(&self, key: &str) -> Option<u32>
fn get_u32(&self, key: &str) -> Option<u32>
Extracts the integer value corresponding to the key and
represents it as
u32
if possible.source§fn get_u64(&self, key: &str) -> Option<u64>
fn get_u64(&self, key: &str) -> Option<u64>
Extracts the integer value corresponding to the key and
represents it as
u64
if possible.source§fn get_usize(&self, key: &str) -> Option<usize>
fn get_usize(&self, key: &str) -> Option<usize>
Extracts the integer value corresponding to the key and
represents it as
usize
if possible.source§fn get_f32(&self, key: &str) -> Option<f32>
fn get_f32(&self, key: &str) -> Option<f32>
Extracts the float value corresponding to the key.
source§fn get_f64(&self, key: &str) -> Option<f64>
fn get_f64(&self, key: &str) -> Option<f64>
Extracts the float value corresponding to the key.
source§fn contains_key(&self, key: &str) -> bool
fn contains_key(&self, key: &str) -> bool
Returns
true
if the record contains a value for the key.source§fn upsert(
&mut self,
key: impl Into<String>,
value: impl Into<AvroValue>
) -> Option<AvroValue>
fn upsert( &mut self, key: impl Into<String>, value: impl Into<AvroValue> ) -> Option<AvroValue>
Inserts or updates a pair into the record.
If the record did have this key, the value is updated and the old value is returned,
otherwise
None
is returned.source§fn flush_to_writer<W: Write>(
self,
schema: &Schema,
writer: W
) -> Result<usize, Error>
fn flush_to_writer<W: Write>( self, schema: &Schema, writer: W ) -> Result<usize, Error>
Flushes the content appended to a writer with the given schema.
Returns the number of bytes written.