avro_rs::schema

Enum SchemaKind

Source
pub enum SchemaKind {
Show 22 variants Null, Boolean, Int, Long, Float, Double, Bytes, String, Array, Map, Union, Record, Enum, Fixed, Decimal, Uuid, Date, TimeMillis, TimeMicros, TimestampMillis, TimestampMicros, Duration,
}
Expand description

Auto-generated discriminant enum variants

Variants§

§

Null

A null Avro schema.

§

Boolean

A boolean Avro schema.

§

Int

An int Avro schema.

§

Long

A long Avro schema.

§

Float

A float Avro schema.

§

Double

A double Avro schema.

§

Bytes

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

§

String

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

§

Array

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.

§

Map

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.

§

Union

A union Avro schema.

§

Record

A record Avro schema.

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

§

Enum

An enum Avro schema.

§

Fixed

A fixed Avro schema.

§

Decimal

Logical type which represents Decimal values. The underlying type is serialized and deserialized as Schema::Bytes or Schema::Fixed.

scale defaults to 0 and is an integer greater than or equal to 0 and precision is an integer greater than 0.

§

Uuid

A universally unique identifier, annotating a string.

§

Date

Logical type which represents the number of days since the unix epoch. Serialization format is Schema::Int.

§

TimeMillis

The time of day in number of milliseconds after midnight with no reference any calendar, time zone or date in particular.

§

TimeMicros

The time of day in number of microseconds after midnight with no reference any calendar, time zone or date in particular.

§

TimestampMillis

An instant in time represented as the number of milliseconds after the UNIX epoch.

§

TimestampMicros

An instant in time represented as the number of microseconds after the UNIX epoch.

§

Duration

An amount of time defined by a number of months, days and milliseconds.

Implementations§

Trait Implementations§

Source§

impl Clone for SchemaKind

Source§

fn clone(&self) -> SchemaKind

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SchemaKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'_enum> From<&'_enum Schema> for SchemaKind

Source§

fn from(val: &'_enum Schema) -> SchemaKind

Converts to this type from the input type.
Source§

impl<'a> From<&'a Value> for SchemaKind

Source§

fn from(value: &'a Value) -> Self

Converts to this type from the input type.
Source§

impl From<Schema> for SchemaKind

Source§

fn from(val: Schema) -> SchemaKind

Converts to this type from the input type.
Source§

impl Hash for SchemaKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SchemaKind

Source§

fn eq(&self, other: &SchemaKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SchemaKind

Source§

impl Eq for SchemaKind

Source§

impl StructuralPartialEq for SchemaKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V