pub enum AvroSchema {
Primitive(AvroPrimitive),
NamedRef(String),
Record(AvroRecord),
Enum(AvroEnum),
Array(AvroArray),
Map(AvroMap),
Fixed(AvroFixed),
Union(AvroUnion),
}Expand description
Parsed Avro schema node.
Variants§
Primitive(AvroPrimitive)
Avro primitive type name or primitive-with-metadata object.
NamedRef(String)
Named type reference (FQCN-style string).
Record(AvroRecord)
Record definition.
Enum(AvroEnum)
Enum definition.
Array(AvroArray)
Array type.
Map(AvroMap)
Map type.
Fixed(AvroFixed)
Fixed type.
Union(AvroUnion)
Union of types.
Implementations§
Source§impl AvroSchema
impl AvroSchema
Sourcepub fn from_value(value: &Value) -> Self
pub fn from_value(value: &Value) -> Self
Parse an Avro schema JSON value into IR.
Sourcepub fn is_schema_value(value: &Value) -> bool
pub fn is_schema_value(value: &Value) -> bool
True when the JSON value looks like an Avro schema document.
Trait Implementations§
Source§impl Clone for AvroSchema
impl Clone for AvroSchema
Source§fn clone(&self) -> AvroSchema
fn clone(&self) -> AvroSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AvroSchema
impl Debug for AvroSchema
Source§impl PartialEq for AvroSchema
impl PartialEq for AvroSchema
Source§fn eq(&self, other: &AvroSchema) -> bool
fn eq(&self, other: &AvroSchema) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AvroSchema
Auto Trait Implementations§
impl Freeze for AvroSchema
impl RefUnwindSafe for AvroSchema
impl Send for AvroSchema
impl Sync for AvroSchema
impl Unpin for AvroSchema
impl UnsafeUnpin for AvroSchema
impl UnwindSafe for AvroSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more