dart_notification.rs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 `dart_notification.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 GridNotification {
  23. Unknown = 0,
  24. GridDidUpdateBlock = 10,
  25. GridDidUpdateCells = 20,
  26. GridDidUpdateFields = 30,
  27. }
  28. impl ::protobuf::ProtobufEnum for GridNotification {
  29. fn value(&self) -> i32 {
  30. *self as i32
  31. }
  32. fn from_i32(value: i32) -> ::std::option::Option<GridNotification> {
  33. match value {
  34. 0 => ::std::option::Option::Some(GridNotification::Unknown),
  35. 10 => ::std::option::Option::Some(GridNotification::GridDidUpdateBlock),
  36. 20 => ::std::option::Option::Some(GridNotification::GridDidUpdateCells),
  37. 30 => ::std::option::Option::Some(GridNotification::GridDidUpdateFields),
  38. _ => ::std::option::Option::None
  39. }
  40. }
  41. fn values() -> &'static [Self] {
  42. static values: &'static [GridNotification] = &[
  43. GridNotification::Unknown,
  44. GridNotification::GridDidUpdateBlock,
  45. GridNotification::GridDidUpdateCells,
  46. GridNotification::GridDidUpdateFields,
  47. ];
  48. values
  49. }
  50. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  51. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  52. descriptor.get(|| {
  53. ::protobuf::reflect::EnumDescriptor::new_pb_name::<GridNotification>("GridNotification", file_descriptor_proto())
  54. })
  55. }
  56. }
  57. impl ::std::marker::Copy for GridNotification {
  58. }
  59. impl ::std::default::Default for GridNotification {
  60. fn default() -> Self {
  61. GridNotification::Unknown
  62. }
  63. }
  64. impl ::protobuf::reflect::ProtobufValue for GridNotification {
  65. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  66. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  67. }
  68. }
  69. static file_descriptor_proto_data: &'static [u8] = b"\
  70. \n\x17dart_notification.proto*h\n\x10GridNotification\x12\x0b\n\x07Unkno\
  71. wn\x10\0\x12\x16\n\x12GridDidUpdateBlock\x10\n\x12\x16\n\x12GridDidUpdat\
  72. eCells\x10\x14\x12\x17\n\x13GridDidUpdateFields\x10\x1eb\x06proto3\
  73. ";
  74. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  75. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  76. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  77. }
  78. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  79. file_descriptor_proto_lazy.get(|| {
  80. parse_descriptor_proto()
  81. })
  82. }