Expand description
Apache Avro is a data serialization system which provides rich
data structures and a compact, fast, binary data format. If you are not familiar with the data
format, please read documentation::primer first.
There are two ways of working with Avro data in this crate:
- Via the generic
Valuetype. - Via types implementing
AvroSchemaand Serde’sSerializeandDeserialize.
The first option is great for dealing with Avro data in a dynamic way. For example, when working
with unknown or rapidly changing schemas or when you don’t want or need to map to Rust types. The
module documentation of documentation::dynamic explains how to work in this dynamic way.
The second option is great when dealing with static schemas that should be decoded to and encoded
from Rust types. The module documentation of serde explains how to work in this static way.
§Features
derive: enable support for derivingAvroSchemasnappy: enable support for the Snappy codeczstandard: enable support for the Zstandard codecbzip: enable support for the Bzip2 codecxz: enable support for the Xz codec
§MSRV
The current MSRV is 1.88.0.
The MSRV may be bumped in minor releases.
Re-exports§
pub use error::Error;pub use reader::Reader;pub use reader::datum::from_avro_datum;Deprecated pub use reader::datum::from_avro_datum_reader_schemata;Deprecated pub use reader::datum::from_avro_datum_schemata;Deprecated pub use reader::read_marker;pub use reader::single_object::GenericSingleObjectReader;pub use reader::single_object::SpecificSingleObjectReader;pub use schema::Schema;pub use serde::AvroSchema;pub use serde::AvroSchemaComponent;pub use serde::from_value;pub use serde::to_value;pub use writer::Clearable;pub use writer::Writer;pub use writer::WriterBuilder;pub use writer::datum::to_avro_datum;Deprecated pub use writer::datum::to_avro_datum_schemata;Deprecated pub use writer::datum::write_avro_datum_ref;pub use writer::single_object::GenericSingleObjectWriter;pub use writer::single_object::SpecificSingleObjectWriter;
Modules§
- documentation
- General documentation that does not fit in a particular module
- error
- headers
- Handling of Avro magic headers
- rabin
- Implementation of the Rabin fingerprint algorithm
- reader
- Logic handling reading from Avro format at user level.
- schema
- Logic for parsing and interacting with schemas in Avro format.
- schema_
compatibility - Check if the reader’s schema is compatible with the writer’s schema.
- schema_
equality - Custom schema equality comparators
- serde
- Using Avro in Rust, the Serde way.
- serde_
avro_ bytes Deprecated - Deprecated. Use
apache_avro::serde::bytesinstead. - serde_
avro_ bytes_ opt Deprecated - Deprecated. Use
apache_avro::serde::bytes_optinstead. - serde_
avro_ fixed Deprecated - Deprecated. Use
apache_avro::serde::fixedinstead. - serde_
avro_ fixed_ opt Deprecated - Deprecated. Use
apache_avro::serde::fixed_optinstead. - serde_
avro_ slice Deprecated - Deprecated. Use
apache_avro::serde::sliceinstead. - serde_
avro_ slice_ opt Deprecated - Deprecated. Use
apache_avro::serde::slice_optinstead. - types
- Logic handling the intermediate representation of Avro values.
- util
- Utility functions, like configuring various global settings.
- validator
- Custom name validation
- writer
- Logic handling writing in Avro format at user level.
Structs§
- BigDecimal
- A big decimal type.
- Bzip2
Settings - Days
- Decimal
- Deflate
Settings - Settings for the
Deflatecodec. - Duration
- A struct representing duration that hides the details of endianness and conversion between platform-native u32 and byte arrays.
- Millis
- Months
- Uuid
- A Universally Unique Identifier (UUID).
- XzSettings
- Zstandard
Settings
Enums§
- Codec
- The compression codec used to compress blocks.
Functions§
- max_
allocation_ bytes Deprecated - Set the maximum number of bytes that can be allocated when decoding data.
- set_
serde_ human_ readable Deprecated - Set whether the serializer and deserializer should indicate to types that the format is human-readable.
Type Aliases§
- Avro
Result - A convenience type alias for
Results withErrors.