Enum avro_rs::schema::Schema[][src]

pub enum Schema {
    Null,
    Boolean,
    Int,
    Long,
    Float,
    Double,
    Bytes,
    String,
    Array(Box<Schema>),
    Map(Box<Schema>),
    Union(UnionSchema),
    Record {
        name: Name,
        doc: Documentation,
        fields: Vec<RecordField>,
        lookup: HashMap<String, usize>,
    },
    Enum {
        name: Name,
        doc: Documentation,
        symbols: Vec<String>,
    },
    Fixed {
        name: Name,
        size: usize,
    },
}

Represents any valid Avro schema More information about Avro schemas can be found in the Avro Specification

Variants

A null Avro schema.

A boolean Avro schema.

An int Avro schema.

A long Avro schema.

A float Avro schema.

A double Avro schema.

A bytes Avro schema. Bytes represents a sequence of 8-bit unsigned bytes.

A string Avro schema. String represents a unicode character sequence.

A array Avro schema. Avro arrays are required to have the same type for each element. This variant holds the Schema for the array element type.

A map Avro schema. Map holds a pointer to the Schema of its values, which must all be the same schema. Map keys are assumed to be string.

A union Avro schema.

A record Avro schema.

The lookup table maps field names to their position in the Vec of fields.

Fields of Record

An enum Avro schema.

Fields of Enum

A fixed Avro schema.

Fields of Fixed

Methods

impl Schema
[src]

Create a Schema from a string representing a JSON Avro schema.

Create a Schema from a serde_json::Value representing a JSON Avro schema.

Converts self into its Parsing Canonical Form.

Trait Implementations

impl Clone for Schema
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Schema
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Schema
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Serialize for Schema
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl Send for Schema

impl Sync for Schema