pub(crate) enum AvroLiteral {
Null,
Boolean(bool),
Int(i32),
Long(i64),
Float(f32),
Double(f64),
Bytes(Vec<u8>),
String(String),
Enum(String),
Array(Vec<AvroLiteral>),
Map(IndexMap<String, AvroLiteral>),
Unsupported,
}
Expand description
Represents a literal Avro value.
This is used to represent default values in an Avro schema.
Variants§
Null
Represents a null value.
Boolean(bool)
Represents a boolean value.
Int(i32)
Represents an integer value.
Long(i64)
Represents a long value.
Float(f32)
Represents a float value.
Double(f64)
Represents a double value.
Bytes(Vec<u8>)
Represents a bytes value.
String(String)
Represents a string value.
Enum(String)
Represents an enum symbol.
Array(Vec<AvroLiteral>)
Represents a JSON array default for an Avro array, containing element literals.
Map(IndexMap<String, AvroLiteral>)
Represents a JSON object default for an Avro map/struct, mapping string keys to value literals.
Unsupported
Represents an unsupported literal type.
Trait Implementations§
Source§impl Clone for AvroLiteral
impl Clone for AvroLiteral
Source§fn clone(&self) -> AvroLiteral
fn clone(&self) -> AvroLiteral
Returns a duplicate of the value. Read more
1.0.0 · 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 AvroLiteral
impl Debug for AvroLiteral
Source§impl PartialEq for AvroLiteral
impl PartialEq for AvroLiteral
impl StructuralPartialEq for AvroLiteral
Auto Trait Implementations§
impl Freeze for AvroLiteral
impl RefUnwindSafe for AvroLiteral
impl Send for AvroLiteral
impl Sync for AvroLiteral
impl Unpin for AvroLiteral
impl UnwindSafe for AvroLiteral
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