Append a null record
(&mut self)
| 627 | |
| 628 | /// Append a null record |
| 629 | fn append_null(&mut self) -> Result<(), AvroError> { |
| 630 | match self { |
| 631 | Self::Null(count) => *count += 1, |
| 632 | Self::Boolean(b) => b.append(false), |
| 633 | Self::Int32(v) | Self::Date32(v) | Self::TimeMillis(v) => v.push(0), |
| 634 | Self::Int64(v) |
| 635 | | Self::Int32ToInt64(v) |
| 636 | | Self::TimeMicros(v) |
| 637 | | Self::TimestampMillis(_, v) |
| 638 | | Self::TimestampMicros(_, v) |
| 639 | | Self::TimestampNanos(_, v) => v.push(0), |
| 640 | #[cfg(feature = "avro_custom_types")] |
| 641 | Self::DurationSecond(v) |
| 642 | | Self::DurationMillisecond(v) |
| 643 | | Self::DurationMicrosecond(v) |
| 644 | | Self::DurationNanosecond(v) => v.push(0), |
| 645 | #[cfg(feature = "avro_custom_types")] |
| 646 | Self::Int8(v) => v.push(0), |
| 647 | #[cfg(feature = "avro_custom_types")] |
| 648 | Self::Int16(v) => v.push(0), |
| 649 | #[cfg(feature = "avro_custom_types")] |
| 650 | Self::UInt8(v) => v.push(0), |
| 651 | #[cfg(feature = "avro_custom_types")] |
| 652 | Self::UInt16(v) => v.push(0), |
| 653 | #[cfg(feature = "avro_custom_types")] |
| 654 | Self::UInt32(v) => v.push(0), |
| 655 | #[cfg(feature = "avro_custom_types")] |
| 656 | Self::UInt64(v) => v.push(0), |
| 657 | #[cfg(feature = "avro_custom_types")] |
| 658 | Self::Float16(v) => v.push(0), |
| 659 | #[cfg(feature = "avro_custom_types")] |
| 660 | Self::Date64(v) | Self::TimeNanos(v) | Self::TimestampSecs(_, v) => v.push(0), |
| 661 | #[cfg(feature = "avro_custom_types")] |
| 662 | Self::IntervalDayTime(v) => v.push(IntervalDayTime::new(0, 0)), |
| 663 | #[cfg(feature = "avro_custom_types")] |
| 664 | Self::IntervalMonthDayNano(v) => v.push(IntervalMonthDayNano::new(0, 0, 0)), |
| 665 | #[cfg(feature = "avro_custom_types")] |
| 666 | Self::Time32Secs(v) | Self::IntervalYearMonth(v) => v.push(0), |
| 667 | Self::Float32(v) | Self::Int32ToFloat32(v) | Self::Int64ToFloat32(v) => v.push(0.), |
| 668 | Self::Float64(v) |
| 669 | | Self::Int32ToFloat64(v) |
| 670 | | Self::Int64ToFloat64(v) |
| 671 | | Self::Float32ToFloat64(v) => v.push(0.), |
| 672 | Self::Binary(offsets, _) |
| 673 | | Self::String(offsets, _) |
| 674 | | Self::StringView(offsets, _) |
| 675 | | Self::BytesToString(offsets, _) |
| 676 | | Self::StringToBytes(offsets, _) => { |
| 677 | offsets.push_length(0); |
| 678 | } |
| 679 | Self::Uuid(v) => { |
| 680 | v.extend([0; 16]); |
| 681 | } |
| 682 | Self::Array(_, offsets, _) => { |
| 683 | offsets.push_length(0); |
| 684 | } |
| 685 | Self::Record(_, e, _, _) => { |
| 686 | for encoding in e.iter_mut() { |