event_map.rs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 TextBlockEvent {
  23. GetBlockData = 0,
  24. ApplyDelta = 1,
  25. ExportDocument = 2,
  26. }
  27. impl ::protobuf::ProtobufEnum for TextBlockEvent {
  28. fn value(&self) -> i32 {
  29. *self as i32
  30. }
  31. fn from_i32(value: i32) -> ::std::option::Option<TextBlockEvent> {
  32. match value {
  33. 0 => ::std::option::Option::Some(TextBlockEvent::GetBlockData),
  34. 1 => ::std::option::Option::Some(TextBlockEvent::ApplyDelta),
  35. 2 => ::std::option::Option::Some(TextBlockEvent::ExportDocument),
  36. _ => ::std::option::Option::None
  37. }
  38. }
  39. fn values() -> &'static [Self] {
  40. static values: &'static [TextBlockEvent] = &[
  41. TextBlockEvent::GetBlockData,
  42. TextBlockEvent::ApplyDelta,
  43. TextBlockEvent::ExportDocument,
  44. ];
  45. values
  46. }
  47. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  48. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  49. descriptor.get(|| {
  50. ::protobuf::reflect::EnumDescriptor::new_pb_name::<TextBlockEvent>("TextBlockEvent", file_descriptor_proto())
  51. })
  52. }
  53. }
  54. impl ::std::marker::Copy for TextBlockEvent {
  55. }
  56. impl ::std::default::Default for TextBlockEvent {
  57. fn default() -> Self {
  58. TextBlockEvent::GetBlockData
  59. }
  60. }
  61. impl ::protobuf::reflect::ProtobufValue for TextBlockEvent {
  62. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  63. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  64. }
  65. }
  66. static file_descriptor_proto_data: &'static [u8] = b"\
  67. \n\x0fevent_map.proto*F\n\x0eTextBlockEvent\x12\x10\n\x0cGetBlockData\
  68. \x10\0\x12\x0e\n\nApplyDelta\x10\x01\x12\x12\n\x0eExportDocument\x10\x02\
  69. b\x06proto3\
  70. ";
  71. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  72. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  73. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  74. }
  75. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  76. file_descriptor_proto_lazy.get(|| {
  77. parse_descriptor_proto()
  78. })
  79. }