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>),
}展开描述
表示一个字面 Avro 值。
这用于表示 Avro 模式中的默认值。
变体§
Null
表示一个空值。
Boolean(bool)
表示一个布尔值。
Int(i32)
表示一个整数值。
Long(i64)
表示一个长整数值。
Float(f32)
表示一个浮点值。
Double(f64)
表示一个双精度浮点值。
Bytes(Vec<u8>)
表示一个字节值。
String(String)
表示一个字符串值。
Enum(String)
表示一个枚举符号。
Array(Vec<AvroLiteral>)
表示 Avro 数组的 JSON 数组默认值,包含元素字面量。
Map(IndexMap<String, AvroLiteral>)
表示 Avro 映射/结构体的 JSON 对象默认值,将字符串键映射到值字面量。
Trait 实现§
来源§为 AvroLiteral 实现 Clone
为 AvroLiteral 实现 Clone
来源§fn clone(&self) -> AvroLiteral
fn clone(&self) -> AvroLiteral
返回值的副本。 阅读更多
1.0.0 · 源§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
执行从
source 的复制赋值。 阅读更多