[−][src]Enum avro_rs::schema::Schema
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
.
Union(UnionSchema)
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.
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.
A universally unique identifier, annotating a string.
Logical type which represents the number of days since the unix epoch.
Serialization format is Schema::Int
.
The time of day in number of milliseconds after midnight with no reference any calendar, time zone or date in particular.
The time of day in number of microseconds after midnight with no reference any calendar, time zone or date in particular.
An instant in time represented as the number of milliseconds after the UNIX epoch.
An instant in time represented as the number of microseconds after the UNIX epoch.
An amount of time defined by a number of months, days and milliseconds.
Methods
impl Schema
[src]
pub fn parse_str(input: &str) -> Result<Self, Error>
[src]
Create a Schema
from a string representing a JSON Avro schema.
pub fn parse(value: &Value) -> Result<Self, Error>
[src]
Create a Schema
from a serde_json::Value
representing a JSON Avro
schema.
pub fn canonical_form(&self) -> String
[src]
Converts self
into its Parsing Canonical Form.
pub fn fingerprint<D: Digest>(&self) -> SchemaFingerprint
[src]
Generate fingerprint of Schema's Parsing Canonical Form.
Trait Implementations
impl Clone for Schema
[src]
impl Debug for Schema
[src]
impl<'_enum> From<&'_enum Schema> for SchemaKind
[src]
fn from(val: &'_enum Schema) -> SchemaKind
[src]
impl From<Schema> for SchemaKind
[src]
fn from(val: Schema) -> SchemaKind
[src]
impl PartialEq<Schema> for Schema
[src]
fn eq(&self, other: &Self) -> bool
[src]
Assess equality of two Schema
based on Parsing Canonical Form.
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Schema
[src]
Auto Trait Implementations
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,