event_map.rs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. // This file is generated by rust-protobuf 2.25.2. Do not edit
  2. // @generated
  3. // https://github.com/rust-lang/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy::all)]
  6. #![allow(unused_attributes)]
  7. #![cfg_attr(rustfmt, rustfmt::skip)]
  8. #![allow(box_pointers)]
  9. #![allow(dead_code)]
  10. #![allow(missing_docs)]
  11. #![allow(non_camel_case_types)]
  12. #![allow(non_snake_case)]
  13. #![allow(non_upper_case_globals)]
  14. #![allow(trivial_casts)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. //! Generated file from `event_map.proto`
  18. /// Generated files are compatible only with the same version
  19. /// of protobuf runtime.
  20. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
  21. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  22. pub enum GridEvent {
  23. GetGridData = 0,
  24. GetGridBlocks = 1,
  25. GetFields = 10,
  26. UpdateField = 11,
  27. CreateField = 12,
  28. CreateDefaultField = 13,
  29. CreateRow = 21,
  30. GetRow = 22,
  31. UpdateCell = 30,
  32. }
  33. impl ::protobuf::ProtobufEnum for GridEvent {
  34. fn value(&self) -> i32 {
  35. *self as i32
  36. }
  37. fn from_i32(value: i32) -> ::std::option::Option<GridEvent> {
  38. match value {
  39. 0 => ::std::option::Option::Some(GridEvent::GetGridData),
  40. 1 => ::std::option::Option::Some(GridEvent::GetGridBlocks),
  41. 10 => ::std::option::Option::Some(GridEvent::GetFields),
  42. 11 => ::std::option::Option::Some(GridEvent::UpdateField),
  43. 12 => ::std::option::Option::Some(GridEvent::CreateField),
  44. 13 => ::std::option::Option::Some(GridEvent::CreateDefaultField),
  45. 21 => ::std::option::Option::Some(GridEvent::CreateRow),
  46. 22 => ::std::option::Option::Some(GridEvent::GetRow),
  47. 30 => ::std::option::Option::Some(GridEvent::UpdateCell),
  48. _ => ::std::option::Option::None
  49. }
  50. }
  51. fn values() -> &'static [Self] {
  52. static values: &'static [GridEvent] = &[
  53. GridEvent::GetGridData,
  54. GridEvent::GetGridBlocks,
  55. GridEvent::GetFields,
  56. GridEvent::UpdateField,
  57. GridEvent::CreateField,
  58. GridEvent::CreateDefaultField,
  59. GridEvent::CreateRow,
  60. GridEvent::GetRow,
  61. GridEvent::UpdateCell,
  62. ];
  63. values
  64. }
  65. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  66. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  67. descriptor.get(|| {
  68. ::protobuf::reflect::EnumDescriptor::new_pb_name::<GridEvent>("GridEvent", file_descriptor_proto())
  69. })
  70. }
  71. }
  72. impl ::std::marker::Copy for GridEvent {
  73. }
  74. impl ::std::default::Default for GridEvent {
  75. fn default() -> Self {
  76. GridEvent::GetGridData
  77. }
  78. }
  79. impl ::protobuf::reflect::ProtobufValue for GridEvent {
  80. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  81. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  82. }
  83. }
  84. static file_descriptor_proto_data: &'static [u8] = b"\
  85. \n\x0fevent_map.proto*\xa3\x01\n\tGridEvent\x12\x0f\n\x0bGetGridData\x10\
  86. \0\x12\x11\n\rGetGridBlocks\x10\x01\x12\r\n\tGetFields\x10\n\x12\x0f\n\
  87. \x0bUpdateField\x10\x0b\x12\x0f\n\x0bCreateField\x10\x0c\x12\x16\n\x12Cr\
  88. eateDefaultField\x10\r\x12\r\n\tCreateRow\x10\x15\x12\n\n\x06GetRow\x10\
  89. \x16\x12\x0e\n\nUpdateCell\x10\x1eb\x06proto3\
  90. ";
  91. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  92. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  93. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  94. }
  95. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  96. file_descriptor_proto_lazy.get(|| {
  97. parse_descriptor_proto()
  98. })
  99. }