Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [2019-03-15T00:38:24Z INFO avro_rs_variants] ==== UnitStructure ===
- [2019-03-15T00:38:24Z INFO avro_rs_variants] schema: Null
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: UnitStructure
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Null
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: UnitStructure
- [2019-03-15T00:38:24Z INFO avro_rs_variants] ==== NewtypeStruct ===
- [2019-03-15T00:38:24Z INFO avro_rs_variants] schema: Array(Union(UnionSchema { schemas: [Boolean, Int, String] }))
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: NewtypeStruct(true, 42, "hello")
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Array([Boolean(true), Int(42), String("hello")])
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: NewtypeStruct(true, 42, "hello")
- [2019-03-15T00:38:24Z INFO avro_rs_variants] ==== Record1 ===
- [2019-03-15T00:38:24Z INFO avro_rs_variants] schema: Record { name: Name { name: "Record1", namespace: None, aliases: None }, doc: None, fields: [RecordField { name: "boolean", doc: None, default: None, schema: Boolean, order: Ascending, position: 0 }, RecordField { name: "int", doc: None, default: None, schema: Int, order: Ascending, position: 1 }, RecordField { name: "string", doc: None, default: None, schema: String, order: Ascending, position: 2 }, RecordField { name: "unit_structure", doc: None, default: None, schema: Null, order: Ascending, position: 3 }], lookup: {"int": 1, "string": 2, "boolean": 0, "unit_structure": 3} }
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure }
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Record([("boolean", Boolean(true)), ("int", Int(42)), ("string", String("hello")), ("unit_structure", Null)])
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure }
- [2019-03-15T00:38:24Z INFO avro_rs_variants] ==== Enum ===
- [2019-03-15T00:38:24Z INFO avro_rs_variants] schema: Union(UnionSchema { schemas: [Null, Array(Union(UnionSchema { schemas: [Boolean, Int, String] })), Record { name: Name { name: "Record1", namespace: None, aliases: None }, doc: None, fields: [RecordField { name: "boolean", doc: None, default: None, schema: Boolean, order: Ascending, position: 0 }, RecordField { name: "int", doc: None, default: None, schema: Int, order: Ascending, position: 1 }, RecordField { name: "string", doc: None, default: None, schema: String, order: Ascending, position: 2 }, RecordField { name: "unit_structure", doc: None, default: None, schema: Null, order: Ascending, position: 3 }], lookup: {"unit_structure": 3, "int": 1, "boolean": 0, "string": 2} }] })
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure }
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Union(2, Record([("boolean", Boolean(true)), ("int", Int(42)), ("string", String("hello")), ("unit_structure", Null)]))
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: Ok(Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure })
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: NewtypeStruct(true, 42, "hello")
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Union(1, Array([Boolean(true), Int(42), String("hello")]))
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: Ok(NewtypeStruct(true, 42, "hello"))
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: UnitStructure
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Union(0, Null)
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: Ok(UnitStructure)
- [2019-03-15T00:38:24Z INFO avro_rs_variants] === Enum2 ===
- [2019-03-15T00:38:24Z INFO avro_rs_variants] schema: Union(UnionSchema { schemas: [Null, Record { name: Name { name: "Hello", namespace: None, aliases: None }, doc: None, fields: [RecordField { name: "message", doc: None, default: None, schema: String, order: Ascending, position: 0 }], lookup: {"message": 0} }, Record { name: Name { name: "Bye", namespace: None, aliases: None }, doc: None, fields: [RecordField { name: "message", doc: None, default: None, schema: String, order: Ascending, position: 0 }], lookup: {"message": 0} }] })
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: Hello { message: "Hai!" }
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Union(1, Record([("message", String("Hai!"))]))
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: Ok(Hello { message: "Hai!" })
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: Noop
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Union(0, Null)
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: Ok(Noop)
- [2019-03-15T00:38:24Z INFO avro_rs_variants] input: Bye { message: "Tschuss!" }
- [2019-03-15T00:38:24Z INFO avro_rs_variants] avro: Union(2, Record([("message", String("Tschuss!"))]))
- [2019-03-15T00:38:24Z INFO avro_rs_variants] output: Ok(Bye { message: "Tschuss!" })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement