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.
Modules§
- documentation
- General documentation that does not fit in a particular module
- error
- Types for dealing with errors.
- 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.
- 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 - Settings for configuring bzip2 compression.
- Days
- The days part of a duration as specified in the Avro specification.
- Decimal
- A decimal as specified in the Avro specification.
- Deflate
Settings - Settings for the
Deflatecodec. - Duration
- A duration as specified in the Avro specification.
- Error
- Errors encountered by Avro.
- Generic
Single Object Reader - Read
Values from a single object encoding. - Generic
Single Object Writer - Encode
Values to the single object encoding. - Millis
- The milliseconds part of a duration as specified in the Avro specification.
- Months
- The months part of a duration as specified in the Avro specification.
- Reader
- Main interface for reading Avro formatted values.
- Specific
Single Object Reader - Read Rust types from a single object encoding.
- Specific
Single Object Writer - Encode Rust types to the single object encoding.
- Uuid
- A Universally Unique Identifier (UUID).
- Writer
- Main interface for writing Avro formatted values.
- Writer
Builder - Use builder syntax to set the inputs and finish with
build(). - XzSettings
- Settings for configuring xz compression.
- Zstandard
Settings - Settings for configuring zstandard compression.
Enums§
- Codec
- The compression codec used to compress blocks.
- Schema
- Represents any valid Avro schema More information about Avro schemas can be found in the Avro Specification
Traits§
- Avro
Schema - Trait for types that serve as an Avro data model.
- Avro
Schema Component - Trait for types that serve as fully defined components inside an Avro data model.
- Clearable
- A buffer that can be cleared.
Functions§
- from_
value - Deserialize a
Valueinto a type implementingDeserializetype. - to_
value - Serialize a type implementing
Serializeinto aValue.
Type Aliases§
- Avro
Result - A convenience type alias for
Results withErrors.