SHARE
TWEET

Untitled

a guest Mar 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [2019-03-15T00:38:24Z INFO  avro_rs_variants] ==== UnitStructure ===
  2. [2019-03-15T00:38:24Z INFO  avro_rs_variants] schema: Null
  3. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: UnitStructure
  4. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Null
  5. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: UnitStructure
  6. [2019-03-15T00:38:24Z INFO  avro_rs_variants] ==== NewtypeStruct ===
  7. [2019-03-15T00:38:24Z INFO  avro_rs_variants] schema: Array(Union(UnionSchema { schemas: [Boolean, Int, String] }))
  8. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: NewtypeStruct(true, 42, "hello")
  9. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Array([Boolean(true), Int(42), String("hello")])
  10. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: NewtypeStruct(true, 42, "hello")
  11. [2019-03-15T00:38:24Z INFO  avro_rs_variants] ==== Record1 ===
  12. [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} }
  13. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure }
  14. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Record([("boolean", Boolean(true)), ("int", Int(42)), ("string", String("hello")), ("unit_structure", Null)])
  15. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure }
  16. [2019-03-15T00:38:24Z INFO  avro_rs_variants] ==== Enum ===
  17. [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} }] })
  18. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure }
  19. [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)]))
  20. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: Ok(Record1 { boolean: true, int: 42, string: "hello", unit_structure: UnitStructure })
  21. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: NewtypeStruct(true, 42, "hello")
  22. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Union(1, Array([Boolean(true), Int(42), String("hello")]))
  23. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: Ok(NewtypeStruct(true, 42, "hello"))
  24. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: UnitStructure
  25. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Union(0, Null)
  26. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: Ok(UnitStructure)
  27. [2019-03-15T00:38:24Z INFO  avro_rs_variants] === Enum2 ===
  28. [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} }] })
  29. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: Hello { message: "Hai!" }
  30. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Union(1, Record([("message", String("Hai!"))]))
  31. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: Ok(Hello { message: "Hai!" })
  32. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: Noop
  33. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Union(0, Null)
  34. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: Ok(Noop)
  35. [2019-03-15T00:38:24Z INFO  avro_rs_variants] input: Bye { message: "Tschuss!" }
  36. [2019-03-15T00:38:24Z INFO  avro_rs_variants] avro: Union(2, Record([("message", String("Tschuss!"))]))
  37. [2019-03-15T00:38:24Z INFO  avro_rs_variants] output: Ok(Bye { message: "Tschuss!" })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top