event_map.rs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. DeleteField = 13,
  29. DuplicateField = 15,
  30. CreateEditFieldContext = 16,
  31. CreateSelectOption = 30,
  32. CreateRow = 50,
  33. GetRow = 51,
  34. UpdateCell = 70,
  35. }
  36. impl ::protobuf::ProtobufEnum for GridEvent {
  37. fn value(&self) -> i32 {
  38. *self as i32
  39. }
  40. fn from_i32(value: i32) -> ::std::option::Option<GridEvent> {
  41. match value {
  42. 0 => ::std::option::Option::Some(GridEvent::GetGridData),
  43. 1 => ::std::option::Option::Some(GridEvent::GetGridBlocks),
  44. 10 => ::std::option::Option::Some(GridEvent::GetFields),
  45. 11 => ::std::option::Option::Some(GridEvent::UpdateField),
  46. 12 => ::std::option::Option::Some(GridEvent::CreateField),
  47. 13 => ::std::option::Option::Some(GridEvent::DeleteField),
  48. 15 => ::std::option::Option::Some(GridEvent::DuplicateField),
  49. 16 => ::std::option::Option::Some(GridEvent::CreateEditFieldContext),
  50. 30 => ::std::option::Option::Some(GridEvent::CreateSelectOption),
  51. 50 => ::std::option::Option::Some(GridEvent::CreateRow),
  52. 51 => ::std::option::Option::Some(GridEvent::GetRow),
  53. 70 => ::std::option::Option::Some(GridEvent::UpdateCell),
  54. _ => ::std::option::Option::None
  55. }
  56. }
  57. fn values() -> &'static [Self] {
  58. static values: &'static [GridEvent] = &[
  59. GridEvent::GetGridData,
  60. GridEvent::GetGridBlocks,
  61. GridEvent::GetFields,
  62. GridEvent::UpdateField,
  63. GridEvent::CreateField,
  64. GridEvent::DeleteField,
  65. GridEvent::DuplicateField,
  66. GridEvent::CreateEditFieldContext,
  67. GridEvent::CreateSelectOption,
  68. GridEvent::CreateRow,
  69. GridEvent::GetRow,
  70. GridEvent::UpdateCell,
  71. ];
  72. values
  73. }
  74. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  75. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  76. descriptor.get(|| {
  77. ::protobuf::reflect::EnumDescriptor::new_pb_name::<GridEvent>("GridEvent", file_descriptor_proto())
  78. })
  79. }
  80. }
  81. impl ::std::marker::Copy for GridEvent {
  82. }
  83. impl ::std::default::Default for GridEvent {
  84. fn default() -> Self {
  85. GridEvent::GetGridData
  86. }
  87. }
  88. impl ::protobuf::reflect::ProtobufValue for GridEvent {
  89. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  90. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  91. }
  92. }
  93. static file_descriptor_proto_data: &'static [u8] = b"\
  94. \n\x0fevent_map.proto*\xe4\x01\n\tGridEvent\x12\x0f\n\x0bGetGridData\x10\
  95. \0\x12\x11\n\rGetGridBlocks\x10\x01\x12\r\n\tGetFields\x10\n\x12\x0f\n\
  96. \x0bUpdateField\x10\x0b\x12\x0f\n\x0bCreateField\x10\x0c\x12\x0f\n\x0bDe\
  97. leteField\x10\r\x12\x12\n\x0eDuplicateField\x10\x0f\x12\x1a\n\x16CreateE\
  98. ditFieldContext\x10\x10\x12\x16\n\x12CreateSelectOption\x10\x1e\x12\r\n\
  99. \tCreateRow\x102\x12\n\n\x06GetRow\x103\x12\x0e\n\nUpdateCell\x10Fb\x06p\
  100. roto3\
  101. ";
  102. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  103. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  104. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  105. }
  106. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  107. file_descriptor_proto_lazy.get(|| {
  108. parse_descriptor_proto()
  109. })
  110. }