|
@@ -27,7 +27,7 @@
|
|
|
pub struct WsDocumentData {
|
|
|
// message fields
|
|
|
pub id: ::std::string::String,
|
|
|
- pub source: WsSource,
|
|
|
+ pub ty: WsDataType,
|
|
|
pub data: ::std::vec::Vec<u8>,
|
|
|
// special fields
|
|
|
pub unknown_fields: ::protobuf::UnknownFields,
|
|
@@ -71,19 +71,19 @@ impl WsDocumentData {
|
|
|
::std::mem::replace(&mut self.id, ::std::string::String::new())
|
|
|
}
|
|
|
|
|
|
- // .WsSource source = 2;
|
|
|
+ // .WsDataType ty = 2;
|
|
|
|
|
|
|
|
|
- pub fn get_source(&self) -> WsSource {
|
|
|
- self.source
|
|
|
+ pub fn get_ty(&self) -> WsDataType {
|
|
|
+ self.ty
|
|
|
}
|
|
|
- pub fn clear_source(&mut self) {
|
|
|
- self.source = WsSource::Delta;
|
|
|
+ pub fn clear_ty(&mut self) {
|
|
|
+ self.ty = WsDataType::Command;
|
|
|
}
|
|
|
|
|
|
// Param is passed by value, moved
|
|
|
- pub fn set_source(&mut self, v: WsSource) {
|
|
|
- self.source = v;
|
|
|
+ pub fn set_ty(&mut self, v: WsDataType) {
|
|
|
+ self.ty = v;
|
|
|
}
|
|
|
|
|
|
// bytes data = 3;
|
|
@@ -126,7 +126,7 @@ impl ::protobuf::Message for WsDocumentData {
|
|
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
|
|
|
},
|
|
|
2 => {
|
|
|
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.source, 2, &mut self.unknown_fields)?
|
|
|
+ ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 2, &mut self.unknown_fields)?
|
|
|
},
|
|
|
3 => {
|
|
|
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
|
|
@@ -146,8 +146,8 @@ impl ::protobuf::Message for WsDocumentData {
|
|
|
if !self.id.is_empty() {
|
|
|
my_size += ::protobuf::rt::string_size(1, &self.id);
|
|
|
}
|
|
|
- if self.source != WsSource::Delta {
|
|
|
- my_size += ::protobuf::rt::enum_size(2, self.source);
|
|
|
+ if self.ty != WsDataType::Command {
|
|
|
+ my_size += ::protobuf::rt::enum_size(2, self.ty);
|
|
|
}
|
|
|
if !self.data.is_empty() {
|
|
|
my_size += ::protobuf::rt::bytes_size(3, &self.data);
|
|
@@ -161,8 +161,8 @@ impl ::protobuf::Message for WsDocumentData {
|
|
|
if !self.id.is_empty() {
|
|
|
os.write_string(1, &self.id)?;
|
|
|
}
|
|
|
- if self.source != WsSource::Delta {
|
|
|
- os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.source))?;
|
|
|
+ if self.ty != WsDataType::Command {
|
|
|
+ os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
|
|
|
}
|
|
|
if !self.data.is_empty() {
|
|
|
os.write_bytes(3, &self.data)?;
|
|
@@ -210,10 +210,10 @@ impl ::protobuf::Message for WsDocumentData {
|
|
|
|m: &WsDocumentData| { &m.id },
|
|
|
|m: &mut WsDocumentData| { &mut m.id },
|
|
|
));
|
|
|
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<WsSource>>(
|
|
|
- "source",
|
|
|
- |m: &WsDocumentData| { &m.source },
|
|
|
- |m: &mut WsDocumentData| { &mut m.source },
|
|
|
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<WsDataType>>(
|
|
|
+ "ty",
|
|
|
+ |m: &WsDocumentData| { &m.ty },
|
|
|
+ |m: &mut WsDocumentData| { &mut m.ty },
|
|
|
));
|
|
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
|
|
|
"data",
|
|
@@ -237,7 +237,7 @@ impl ::protobuf::Message for WsDocumentData {
|
|
|
impl ::protobuf::Clear for WsDocumentData {
|
|
|
fn clear(&mut self) {
|
|
|
self.id.clear();
|
|
|
- self.source = WsSource::Delta;
|
|
|
+ self.ty = WsDataType::Command;
|
|
|
self.data.clear();
|
|
|
self.unknown_fields.clear();
|
|
|
}
|
|
@@ -256,25 +256,28 @@ impl ::protobuf::reflect::ProtobufValue for WsDocumentData {
|
|
|
}
|
|
|
|
|
|
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
|
|
-pub enum WsSource {
|
|
|
- Delta = 0,
|
|
|
+pub enum WsDataType {
|
|
|
+ Command = 0,
|
|
|
+ Delta = 1,
|
|
|
}
|
|
|
|
|
|
-impl ::protobuf::ProtobufEnum for WsSource {
|
|
|
+impl ::protobuf::ProtobufEnum for WsDataType {
|
|
|
fn value(&self) -> i32 {
|
|
|
*self as i32
|
|
|
}
|
|
|
|
|
|
- fn from_i32(value: i32) -> ::std::option::Option<WsSource> {
|
|
|
+ fn from_i32(value: i32) -> ::std::option::Option<WsDataType> {
|
|
|
match value {
|
|
|
- 0 => ::std::option::Option::Some(WsSource::Delta),
|
|
|
+ 0 => ::std::option::Option::Some(WsDataType::Command),
|
|
|
+ 1 => ::std::option::Option::Some(WsDataType::Delta),
|
|
|
_ => ::std::option::Option::None
|
|
|
}
|
|
|
}
|
|
|
|
|
|
fn values() -> &'static [Self] {
|
|
|
- static values: &'static [WsSource] = &[
|
|
|
- WsSource::Delta,
|
|
|
+ static values: &'static [WsDataType] = &[
|
|
|
+ WsDataType::Command,
|
|
|
+ WsDataType::Delta,
|
|
|
];
|
|
|
values
|
|
|
}
|
|
@@ -282,44 +285,46 @@ impl ::protobuf::ProtobufEnum for WsSource {
|
|
|
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
|
|
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
|
|
descriptor.get(|| {
|
|
|
- ::protobuf::reflect::EnumDescriptor::new_pb_name::<WsSource>("WsSource", file_descriptor_proto())
|
|
|
+ ::protobuf::reflect::EnumDescriptor::new_pb_name::<WsDataType>("WsDataType", file_descriptor_proto())
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-impl ::std::marker::Copy for WsSource {
|
|
|
+impl ::std::marker::Copy for WsDataType {
|
|
|
}
|
|
|
|
|
|
-impl ::std::default::Default for WsSource {
|
|
|
+impl ::std::default::Default for WsDataType {
|
|
|
fn default() -> Self {
|
|
|
- WsSource::Delta
|
|
|
+ WsDataType::Command
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-impl ::protobuf::reflect::ProtobufValue for WsSource {
|
|
|
+impl ::protobuf::reflect::ProtobufValue for WsDataType {
|
|
|
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
|
|
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static file_descriptor_proto_data: &'static [u8] = b"\
|
|
|
- \n\x08ws.proto\"W\n\x0eWsDocumentData\x12\x0e\n\x02id\x18\x01\x20\x01(\t\
|
|
|
- R\x02id\x12!\n\x06source\x18\x02\x20\x01(\x0e2\t.WsSourceR\x06source\x12\
|
|
|
- \x12\n\x04data\x18\x03\x20\x01(\x0cR\x04data*\x15\n\x08WsSource\x12\t\n\
|
|
|
- \x05Delta\x10\0J\x90\x02\n\x06\x12\x04\0\0\t\x01\n\x08\n\x01\x0c\x12\x03\
|
|
|
- \0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x06\x01\n\n\n\x03\x04\0\x01\x12\
|
|
|
- \x03\x02\x08\x16\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x12\n\x0c\n\x05\
|
|
|
- \x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\
|
|
|
- \x03\x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x10\x11\n\x0b\n\x04\
|
|
|
- \x04\0\x02\x01\x12\x03\x04\x04\x18\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\
|
|
|
- \x04\x04\x0c\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\r\x13\n\x0c\n\x05\
|
|
|
- \x04\0\x02\x01\x03\x12\x03\x04\x16\x17\n\x0b\n\x04\x04\0\x02\x02\x12\x03\
|
|
|
- \x05\x04\x13\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x05\x04\t\n\x0c\n\x05\
|
|
|
- \x04\0\x02\x02\x01\x12\x03\x05\n\x0e\n\x0c\n\x05\x04\0\x02\x02\x03\x12\
|
|
|
- \x03\x05\x11\x12\n\n\n\x02\x05\0\x12\x04\x07\0\t\x01\n\n\n\x03\x05\0\x01\
|
|
|
- \x12\x03\x07\x05\r\n\x0b\n\x04\x05\0\x02\0\x12\x03\x08\x04\x0e\n\x0c\n\
|
|
|
- \x05\x05\0\x02\0\x01\x12\x03\x08\x04\t\n\x0c\n\x05\x05\0\x02\0\x02\x12\
|
|
|
- \x03\x08\x0c\rb\x06proto3\
|
|
|
+ \n\x08ws.proto\"Q\n\x0eWsDocumentData\x12\x0e\n\x02id\x18\x01\x20\x01(\t\
|
|
|
+ R\x02id\x12\x1b\n\x02ty\x18\x02\x20\x01(\x0e2\x0b.WsDataTypeR\x02ty\x12\
|
|
|
+ \x12\n\x04data\x18\x03\x20\x01(\x0cR\x04data*$\n\nWsDataType\x12\x0b\n\
|
|
|
+ \x07Command\x10\0\x12\t\n\x05Delta\x10\x01J\xb9\x02\n\x06\x12\x04\0\0\n\
|
|
|
+ \x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x06\
|
|
|
+ \x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x16\n\x0b\n\x04\x04\0\x02\0\x12\
|
|
|
+ \x03\x03\x04\x12\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\
|
|
|
+ \x05\x04\0\x02\0\x01\x12\x03\x03\x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\
|
|
|
+ \x03\x03\x10\x11\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x16\n\x0c\n\
|
|
|
+ \x05\x04\0\x02\x01\x06\x12\x03\x04\x04\x0e\n\x0c\n\x05\x04\0\x02\x01\x01\
|
|
|
+ \x12\x03\x04\x0f\x11\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x14\x15\n\
|
|
|
+ \x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x13\n\x0c\n\x05\x04\0\x02\x02\
|
|
|
+ \x05\x12\x03\x05\x04\t\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\n\x0e\n\
|
|
|
+ \x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x11\x12\n\n\n\x02\x05\0\x12\x04\
|
|
|
+ \x07\0\n\x01\n\n\n\x03\x05\0\x01\x12\x03\x07\x05\x0f\n\x0b\n\x04\x05\0\
|
|
|
+ \x02\0\x12\x03\x08\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x08\x04\
|
|
|
+ \x0b\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x08\x0e\x0f\n\x0b\n\x04\x05\0\
|
|
|
+ \x02\x01\x12\x03\t\x04\x0e\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\t\x04\t\
|
|
|
+ \n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\t\x0c\rb\x06proto3\
|
|
|
";
|
|
|
|
|
|
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|