chore: ignore rust's protobuf crate

This commit is contained in:
appflowy 2022-06-15 19:42:27 +08:00
parent 4b71c474e4
commit 94276d438d
61 changed files with 4 additions and 29754 deletions

4
.gitignore vendored
View File

@ -17,4 +17,6 @@ yarn.lock
node_modules
**/.proto_cache
**/.cache
**/.DS_Store
**/.DS_Store
**/src/protobuf

View File

@ -10,5 +10,5 @@
**/**/*.log*
**/**/temp
bin/
**/src/protobuf
.idea/

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,243 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `ffi_request.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct FFIRequest {
// message fields
pub event: ::std::string::String,
pub payload: ::std::vec::Vec<u8>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FFIRequest {
fn default() -> &'a FFIRequest {
<FFIRequest as ::protobuf::Message>::default_instance()
}
}
impl FFIRequest {
pub fn new() -> FFIRequest {
::std::default::Default::default()
}
// string event = 1;
pub fn get_event(&self) -> &str {
&self.event
}
pub fn clear_event(&mut self) {
self.event.clear();
}
// Param is passed by value, moved
pub fn set_event(&mut self, v: ::std::string::String) {
self.event = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_event(&mut self) -> &mut ::std::string::String {
&mut self.event
}
// Take field
pub fn take_event(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.event, ::std::string::String::new())
}
// bytes payload = 2;
pub fn get_payload(&self) -> &[u8] {
&self.payload
}
pub fn clear_payload(&mut self) {
self.payload.clear();
}
// Param is passed by value, moved
pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
self.payload = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.payload
}
// Take field
pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.payload, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for FFIRequest {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.event)?;
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.payload)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.event.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.event);
}
if !self.payload.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.payload);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.event.is_empty() {
os.write_string(1, &self.event)?;
}
if !self.payload.is_empty() {
os.write_bytes(2, &self.payload)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FFIRequest {
FFIRequest::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"event",
|m: &FFIRequest| { &m.event },
|m: &mut FFIRequest| { &mut m.event },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"payload",
|m: &FFIRequest| { &m.payload },
|m: &mut FFIRequest| { &mut m.payload },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FFIRequest>(
"FFIRequest",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FFIRequest {
static instance: ::protobuf::rt::LazyV2<FFIRequest> = ::protobuf::rt::LazyV2::INIT;
instance.get(FFIRequest::new)
}
}
impl ::protobuf::Clear for FFIRequest {
fn clear(&mut self) {
self.event.clear();
self.payload.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FFIRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FFIRequest {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x11ffi_request.proto\"<\n\nFFIRequest\x12\x14\n\x05event\x18\x01\x20\
\x01(\tR\x05event\x12\x18\n\x07payload\x18\x02\x20\x01(\x0cR\x07payloadb\
\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,286 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `ffi_response.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct FFIResponse {
// message fields
pub payload: ::std::vec::Vec<u8>,
pub code: FFIStatusCode,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FFIResponse {
fn default() -> &'a FFIResponse {
<FFIResponse as ::protobuf::Message>::default_instance()
}
}
impl FFIResponse {
pub fn new() -> FFIResponse {
::std::default::Default::default()
}
// bytes payload = 1;
pub fn get_payload(&self) -> &[u8] {
&self.payload
}
pub fn clear_payload(&mut self) {
self.payload.clear();
}
// Param is passed by value, moved
pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
self.payload = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.payload
}
// Take field
pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.payload, ::std::vec::Vec::new())
}
// .FFIStatusCode code = 2;
pub fn get_code(&self) -> FFIStatusCode {
self.code
}
pub fn clear_code(&mut self) {
self.code = FFIStatusCode::Ok;
}
// Param is passed by value, moved
pub fn set_code(&mut self, v: FFIStatusCode) {
self.code = v;
}
}
impl ::protobuf::Message for FFIResponse {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.payload)?;
},
2 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 2, &mut self.unknown_fields)?
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.payload.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.payload);
}
if self.code != FFIStatusCode::Ok {
my_size += ::protobuf::rt::enum_size(2, self.code);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.payload.is_empty() {
os.write_bytes(1, &self.payload)?;
}
if self.code != FFIStatusCode::Ok {
os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.code))?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FFIResponse {
FFIResponse::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"payload",
|m: &FFIResponse| { &m.payload },
|m: &mut FFIResponse| { &mut m.payload },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FFIStatusCode>>(
"code",
|m: &FFIResponse| { &m.code },
|m: &mut FFIResponse| { &mut m.code },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FFIResponse>(
"FFIResponse",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FFIResponse {
static instance: ::protobuf::rt::LazyV2<FFIResponse> = ::protobuf::rt::LazyV2::INIT;
instance.get(FFIResponse::new)
}
}
impl ::protobuf::Clear for FFIResponse {
fn clear(&mut self) {
self.payload.clear();
self.code = FFIStatusCode::Ok;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FFIResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FFIResponse {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum FFIStatusCode {
Ok = 0,
Err = 1,
Internal = 2,
}
impl ::protobuf::ProtobufEnum for FFIStatusCode {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<FFIStatusCode> {
match value {
0 => ::std::option::Option::Some(FFIStatusCode::Ok),
1 => ::std::option::Option::Some(FFIStatusCode::Err),
2 => ::std::option::Option::Some(FFIStatusCode::Internal),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [FFIStatusCode] = &[
FFIStatusCode::Ok,
FFIStatusCode::Err,
FFIStatusCode::Internal,
];
values
}
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::<FFIStatusCode>("FFIStatusCode", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for FFIStatusCode {
}
impl ::std::default::Default for FFIStatusCode {
fn default() -> Self {
FFIStatusCode::Ok
}
}
impl ::protobuf::reflect::ProtobufValue for FFIStatusCode {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x12ffi_response.proto\"K\n\x0bFFIResponse\x12\x18\n\x07payload\x18\
\x01\x20\x01(\x0cR\x07payload\x12\"\n\x04code\x18\x02\x20\x01(\x0e2\x0e.\
FFIStatusCodeR\x04code*.\n\rFFIStatusCode\x12\x06\n\x02Ok\x10\0\x12\x07\
\n\x03Err\x10\x01\x12\x0c\n\x08Internal\x10\x02b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,8 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod ffi_response;
pub use ffi_response::*;
mod ffi_request;
pub use ffi_request::*;

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,5 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod subject;
pub use subject::*;

View File

@ -1,444 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `subject.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct SubscribeObject {
// message fields
pub source: ::std::string::String,
pub ty: i32,
pub id: ::std::string::String,
// message oneof groups
pub one_of_payload: ::std::option::Option<SubscribeObject_oneof_one_of_payload>,
pub one_of_error: ::std::option::Option<SubscribeObject_oneof_one_of_error>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a SubscribeObject {
fn default() -> &'a SubscribeObject {
<SubscribeObject as ::protobuf::Message>::default_instance()
}
}
#[derive(Clone,PartialEq,Debug)]
pub enum SubscribeObject_oneof_one_of_payload {
payload(::std::vec::Vec<u8>),
}
#[derive(Clone,PartialEq,Debug)]
pub enum SubscribeObject_oneof_one_of_error {
error(::std::vec::Vec<u8>),
}
impl SubscribeObject {
pub fn new() -> SubscribeObject {
::std::default::Default::default()
}
// string source = 1;
pub fn get_source(&self) -> &str {
&self.source
}
pub fn clear_source(&mut self) {
self.source.clear();
}
// Param is passed by value, moved
pub fn set_source(&mut self, v: ::std::string::String) {
self.source = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_source(&mut self) -> &mut ::std::string::String {
&mut self.source
}
// Take field
pub fn take_source(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.source, ::std::string::String::new())
}
// int32 ty = 2;
pub fn get_ty(&self) -> i32 {
self.ty
}
pub fn clear_ty(&mut self) {
self.ty = 0;
}
// Param is passed by value, moved
pub fn set_ty(&mut self, v: i32) {
self.ty = v;
}
// string id = 3;
pub fn get_id(&self) -> &str {
&self.id
}
pub fn clear_id(&mut self) {
self.id.clear();
}
// Param is passed by value, moved
pub fn set_id(&mut self, v: ::std::string::String) {
self.id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_id(&mut self) -> &mut ::std::string::String {
&mut self.id
}
// Take field
pub fn take_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.id, ::std::string::String::new())
}
// bytes payload = 4;
pub fn get_payload(&self) -> &[u8] {
match self.one_of_payload {
::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(ref v)) => v,
_ => &[],
}
}
pub fn clear_payload(&mut self) {
self.one_of_payload = ::std::option::Option::None;
}
pub fn has_payload(&self) -> bool {
match self.one_of_payload {
::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(..)) => true,
_ => false,
}
}
// Param is passed by value, moved
pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
self.one_of_payload = ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(v))
}
// Mutable pointer to the field.
pub fn mut_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
if let ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(_)) = self.one_of_payload {
} else {
self.one_of_payload = ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(::std::vec::Vec::new()));
}
match self.one_of_payload {
::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(ref mut v)) => v,
_ => panic!(),
}
}
// Take field
pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
if self.has_payload() {
match self.one_of_payload.take() {
::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(v)) => v,
_ => panic!(),
}
} else {
::std::vec::Vec::new()
}
}
// bytes error = 5;
pub fn get_error(&self) -> &[u8] {
match self.one_of_error {
::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(ref v)) => v,
_ => &[],
}
}
pub fn clear_error(&mut self) {
self.one_of_error = ::std::option::Option::None;
}
pub fn has_error(&self) -> bool {
match self.one_of_error {
::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(..)) => true,
_ => false,
}
}
// Param is passed by value, moved
pub fn set_error(&mut self, v: ::std::vec::Vec<u8>) {
self.one_of_error = ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(v))
}
// Mutable pointer to the field.
pub fn mut_error(&mut self) -> &mut ::std::vec::Vec<u8> {
if let ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(_)) = self.one_of_error {
} else {
self.one_of_error = ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(::std::vec::Vec::new()));
}
match self.one_of_error {
::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(ref mut v)) => v,
_ => panic!(),
}
}
// Take field
pub fn take_error(&mut self) -> ::std::vec::Vec<u8> {
if self.has_error() {
match self.one_of_error.take() {
::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(v)) => v,
_ => panic!(),
}
} else {
::std::vec::Vec::new()
}
}
}
impl ::protobuf::Message for SubscribeObject {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.source)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.ty = tmp;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.one_of_payload = ::std::option::Option::Some(SubscribeObject_oneof_one_of_payload::payload(is.read_bytes()?));
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.one_of_error = ::std::option::Option::Some(SubscribeObject_oneof_one_of_error::error(is.read_bytes()?));
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.source.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.source);
}
if self.ty != 0 {
my_size += ::protobuf::rt::value_size(2, self.ty, ::protobuf::wire_format::WireTypeVarint);
}
if !self.id.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.id);
}
if let ::std::option::Option::Some(ref v) = self.one_of_payload {
match v {
&SubscribeObject_oneof_one_of_payload::payload(ref v) => {
my_size += ::protobuf::rt::bytes_size(4, &v);
},
};
}
if let ::std::option::Option::Some(ref v) = self.one_of_error {
match v {
&SubscribeObject_oneof_one_of_error::error(ref v) => {
my_size += ::protobuf::rt::bytes_size(5, &v);
},
};
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.source.is_empty() {
os.write_string(1, &self.source)?;
}
if self.ty != 0 {
os.write_int32(2, self.ty)?;
}
if !self.id.is_empty() {
os.write_string(3, &self.id)?;
}
if let ::std::option::Option::Some(ref v) = self.one_of_payload {
match v {
&SubscribeObject_oneof_one_of_payload::payload(ref v) => {
os.write_bytes(4, v)?;
},
};
}
if let ::std::option::Option::Some(ref v) = self.one_of_error {
match v {
&SubscribeObject_oneof_one_of_error::error(ref v) => {
os.write_bytes(5, v)?;
},
};
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> SubscribeObject {
SubscribeObject::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"source",
|m: &SubscribeObject| { &m.source },
|m: &mut SubscribeObject| { &mut m.source },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"ty",
|m: &SubscribeObject| { &m.ty },
|m: &mut SubscribeObject| { &mut m.ty },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"id",
|m: &SubscribeObject| { &m.id },
|m: &mut SubscribeObject| { &mut m.id },
));
fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
"payload",
SubscribeObject::has_payload,
SubscribeObject::get_payload,
));
fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
"error",
SubscribeObject::has_error,
SubscribeObject::get_error,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<SubscribeObject>(
"SubscribeObject",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static SubscribeObject {
static instance: ::protobuf::rt::LazyV2<SubscribeObject> = ::protobuf::rt::LazyV2::INIT;
instance.get(SubscribeObject::new)
}
}
impl ::protobuf::Clear for SubscribeObject {
fn clear(&mut self) {
self.source.clear();
self.ty = 0;
self.id.clear();
self.one_of_payload = ::std::option::Option::None;
self.one_of_error = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for SubscribeObject {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for SubscribeObject {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\rsubject.proto\"\x9f\x01\n\x0fSubscribeObject\x12\x16\n\x06source\x18\
\x01\x20\x01(\tR\x06source\x12\x0e\n\x02ty\x18\x02\x20\x01(\x05R\x02ty\
\x12\x0e\n\x02id\x18\x03\x20\x01(\tR\x02id\x12\x1a\n\x07payload\x18\x04\
\x20\x01(\x0cH\0R\x07payload\x12\x16\n\x05error\x18\x05\x20\x01(\x0cH\
\x01R\x05errorB\x10\n\x0eone_of_payloadB\x0e\n\x0cone_of_errorb\x06proto\
3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,235 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `errors.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct FlowyError {
// message fields
pub code: i32,
pub msg: ::std::string::String,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FlowyError {
fn default() -> &'a FlowyError {
<FlowyError as ::protobuf::Message>::default_instance()
}
}
impl FlowyError {
pub fn new() -> FlowyError {
::std::default::Default::default()
}
// int32 code = 1;
pub fn get_code(&self) -> i32 {
self.code
}
pub fn clear_code(&mut self) {
self.code = 0;
}
// Param is passed by value, moved
pub fn set_code(&mut self, v: i32) {
self.code = v;
}
// string msg = 2;
pub fn get_msg(&self) -> &str {
&self.msg
}
pub fn clear_msg(&mut self) {
self.msg.clear();
}
// Param is passed by value, moved
pub fn set_msg(&mut self, v: ::std::string::String) {
self.msg = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_msg(&mut self) -> &mut ::std::string::String {
&mut self.msg
}
// Take field
pub fn take_msg(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.msg, ::std::string::String::new())
}
}
impl ::protobuf::Message for FlowyError {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.code = tmp;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.msg)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.code != 0 {
my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
}
if !self.msg.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.msg);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.code != 0 {
os.write_int32(1, self.code)?;
}
if !self.msg.is_empty() {
os.write_string(2, &self.msg)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FlowyError {
FlowyError::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"code",
|m: &FlowyError| { &m.code },
|m: &mut FlowyError| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"msg",
|m: &FlowyError| { &m.msg },
|m: &mut FlowyError| { &mut m.msg },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FlowyError>(
"FlowyError",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FlowyError {
static instance: ::protobuf::rt::LazyV2<FlowyError> = ::protobuf::rt::LazyV2::INIT;
instance.get(FlowyError::new)
}
}
impl ::protobuf::Clear for FlowyError {
fn clear(&mut self) {
self.code = 0;
self.msg.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FlowyError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FlowyError {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0cerrors.proto\"2\n\nFlowyError\x12\x12\n\x04code\x18\x01\x20\x01(\
\x05R\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03msgb\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,5 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod errors;
pub use errors::*;

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,134 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `dart_notification.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum FolderNotification {
Unknown = 0,
UserCreateWorkspace = 10,
UserDeleteWorkspace = 11,
WorkspaceUpdated = 12,
WorkspaceListUpdated = 13,
WorkspaceAppsChanged = 14,
WorkspaceSetting = 15,
AppUpdated = 21,
AppViewsChanged = 24,
ViewUpdated = 31,
ViewDeleted = 32,
ViewRestored = 33,
UserUnauthorized = 100,
TrashUpdated = 1000,
}
impl ::protobuf::ProtobufEnum for FolderNotification {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<FolderNotification> {
match value {
0 => ::std::option::Option::Some(FolderNotification::Unknown),
10 => ::std::option::Option::Some(FolderNotification::UserCreateWorkspace),
11 => ::std::option::Option::Some(FolderNotification::UserDeleteWorkspace),
12 => ::std::option::Option::Some(FolderNotification::WorkspaceUpdated),
13 => ::std::option::Option::Some(FolderNotification::WorkspaceListUpdated),
14 => ::std::option::Option::Some(FolderNotification::WorkspaceAppsChanged),
15 => ::std::option::Option::Some(FolderNotification::WorkspaceSetting),
21 => ::std::option::Option::Some(FolderNotification::AppUpdated),
24 => ::std::option::Option::Some(FolderNotification::AppViewsChanged),
31 => ::std::option::Option::Some(FolderNotification::ViewUpdated),
32 => ::std::option::Option::Some(FolderNotification::ViewDeleted),
33 => ::std::option::Option::Some(FolderNotification::ViewRestored),
100 => ::std::option::Option::Some(FolderNotification::UserUnauthorized),
1000 => ::std::option::Option::Some(FolderNotification::TrashUpdated),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [FolderNotification] = &[
FolderNotification::Unknown,
FolderNotification::UserCreateWorkspace,
FolderNotification::UserDeleteWorkspace,
FolderNotification::WorkspaceUpdated,
FolderNotification::WorkspaceListUpdated,
FolderNotification::WorkspaceAppsChanged,
FolderNotification::WorkspaceSetting,
FolderNotification::AppUpdated,
FolderNotification::AppViewsChanged,
FolderNotification::ViewUpdated,
FolderNotification::ViewDeleted,
FolderNotification::ViewRestored,
FolderNotification::UserUnauthorized,
FolderNotification::TrashUpdated,
];
values
}
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::<FolderNotification>("FolderNotification", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for FolderNotification {
}
impl ::std::default::Default for FolderNotification {
fn default() -> Self {
FolderNotification::Unknown
}
}
impl ::protobuf::reflect::ProtobufValue for FolderNotification {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x17dart_notification.proto*\xb5\x02\n\x12FolderNotification\x12\x0b\n\
\x07Unknown\x10\0\x12\x17\n\x13UserCreateWorkspace\x10\n\x12\x17\n\x13Us\
erDeleteWorkspace\x10\x0b\x12\x14\n\x10WorkspaceUpdated\x10\x0c\x12\x18\
\n\x14WorkspaceListUpdated\x10\r\x12\x18\n\x14WorkspaceAppsChanged\x10\
\x0e\x12\x14\n\x10WorkspaceSetting\x10\x0f\x12\x0e\n\nAppUpdated\x10\x15\
\x12\x13\n\x0fAppViewsChanged\x10\x18\x12\x0f\n\x0bViewUpdated\x10\x1f\
\x12\x0f\n\x0bViewDeleted\x10\x20\x12\x10\n\x0cViewRestored\x10!\x12\x14\
\n\x10UserUnauthorized\x10d\x12\x11\n\x0cTrashUpdated\x10\xe8\x07b\x06pr\
oto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,171 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `event_map.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum FolderEvent {
CreateWorkspace = 0,
ReadCurWorkspace = 1,
ReadWorkspaces = 2,
DeleteWorkspace = 3,
OpenWorkspace = 4,
ReadWorkspaceApps = 5,
CreateApp = 101,
DeleteApp = 102,
ReadApp = 103,
UpdateApp = 104,
CreateView = 201,
ReadView = 202,
UpdateView = 203,
DeleteView = 204,
DuplicateView = 205,
CloseView = 206,
ReadViewInfo = 207,
CopyLink = 220,
SetLatestView = 221,
MoveFolderItem = 230,
ReadTrash = 300,
PutbackTrash = 301,
DeleteTrash = 302,
RestoreAllTrash = 303,
DeleteAllTrash = 304,
}
impl ::protobuf::ProtobufEnum for FolderEvent {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<FolderEvent> {
match value {
0 => ::std::option::Option::Some(FolderEvent::CreateWorkspace),
1 => ::std::option::Option::Some(FolderEvent::ReadCurWorkspace),
2 => ::std::option::Option::Some(FolderEvent::ReadWorkspaces),
3 => ::std::option::Option::Some(FolderEvent::DeleteWorkspace),
4 => ::std::option::Option::Some(FolderEvent::OpenWorkspace),
5 => ::std::option::Option::Some(FolderEvent::ReadWorkspaceApps),
101 => ::std::option::Option::Some(FolderEvent::CreateApp),
102 => ::std::option::Option::Some(FolderEvent::DeleteApp),
103 => ::std::option::Option::Some(FolderEvent::ReadApp),
104 => ::std::option::Option::Some(FolderEvent::UpdateApp),
201 => ::std::option::Option::Some(FolderEvent::CreateView),
202 => ::std::option::Option::Some(FolderEvent::ReadView),
203 => ::std::option::Option::Some(FolderEvent::UpdateView),
204 => ::std::option::Option::Some(FolderEvent::DeleteView),
205 => ::std::option::Option::Some(FolderEvent::DuplicateView),
206 => ::std::option::Option::Some(FolderEvent::CloseView),
207 => ::std::option::Option::Some(FolderEvent::ReadViewInfo),
220 => ::std::option::Option::Some(FolderEvent::CopyLink),
221 => ::std::option::Option::Some(FolderEvent::SetLatestView),
230 => ::std::option::Option::Some(FolderEvent::MoveFolderItem),
300 => ::std::option::Option::Some(FolderEvent::ReadTrash),
301 => ::std::option::Option::Some(FolderEvent::PutbackTrash),
302 => ::std::option::Option::Some(FolderEvent::DeleteTrash),
303 => ::std::option::Option::Some(FolderEvent::RestoreAllTrash),
304 => ::std::option::Option::Some(FolderEvent::DeleteAllTrash),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [FolderEvent] = &[
FolderEvent::CreateWorkspace,
FolderEvent::ReadCurWorkspace,
FolderEvent::ReadWorkspaces,
FolderEvent::DeleteWorkspace,
FolderEvent::OpenWorkspace,
FolderEvent::ReadWorkspaceApps,
FolderEvent::CreateApp,
FolderEvent::DeleteApp,
FolderEvent::ReadApp,
FolderEvent::UpdateApp,
FolderEvent::CreateView,
FolderEvent::ReadView,
FolderEvent::UpdateView,
FolderEvent::DeleteView,
FolderEvent::DuplicateView,
FolderEvent::CloseView,
FolderEvent::ReadViewInfo,
FolderEvent::CopyLink,
FolderEvent::SetLatestView,
FolderEvent::MoveFolderItem,
FolderEvent::ReadTrash,
FolderEvent::PutbackTrash,
FolderEvent::DeleteTrash,
FolderEvent::RestoreAllTrash,
FolderEvent::DeleteAllTrash,
];
values
}
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::<FolderEvent>("FolderEvent", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for FolderEvent {
}
impl ::std::default::Default for FolderEvent {
fn default() -> Self {
FolderEvent::CreateWorkspace
}
}
impl ::protobuf::reflect::ProtobufValue for FolderEvent {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0fevent_map.proto*\xd6\x03\n\x0bFolderEvent\x12\x13\n\x0fCreateWorks\
pace\x10\0\x12\x14\n\x10ReadCurWorkspace\x10\x01\x12\x12\n\x0eReadWorksp\
aces\x10\x02\x12\x13\n\x0fDeleteWorkspace\x10\x03\x12\x11\n\rOpenWorkspa\
ce\x10\x04\x12\x15\n\x11ReadWorkspaceApps\x10\x05\x12\r\n\tCreateApp\x10\
e\x12\r\n\tDeleteApp\x10f\x12\x0b\n\x07ReadApp\x10g\x12\r\n\tUpdateApp\
\x10h\x12\x0f\n\nCreateView\x10\xc9\x01\x12\r\n\x08ReadView\x10\xca\x01\
\x12\x0f\n\nUpdateView\x10\xcb\x01\x12\x0f\n\nDeleteView\x10\xcc\x01\x12\
\x12\n\rDuplicateView\x10\xcd\x01\x12\x0e\n\tCloseView\x10\xce\x01\x12\
\x11\n\x0cReadViewInfo\x10\xcf\x01\x12\r\n\x08CopyLink\x10\xdc\x01\x12\
\x12\n\rSetLatestView\x10\xdd\x01\x12\x13\n\x0eMoveFolderItem\x10\xe6\
\x01\x12\x0e\n\tReadTrash\x10\xac\x02\x12\x11\n\x0cPutbackTrash\x10\xad\
\x02\x12\x10\n\x0bDeleteTrash\x10\xae\x02\x12\x14\n\x0fRestoreAllTrash\
\x10\xaf\x02\x12\x13\n\x0eDeleteAllTrash\x10\xb0\x02b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,8 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod dart_notification;
pub use dart_notification::*;
mod event_map;
pub use event_map::*;

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,88 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `event_map.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum NetworkEvent {
UpdateNetworkType = 0,
}
impl ::protobuf::ProtobufEnum for NetworkEvent {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<NetworkEvent> {
match value {
0 => ::std::option::Option::Some(NetworkEvent::UpdateNetworkType),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [NetworkEvent] = &[
NetworkEvent::UpdateNetworkType,
];
values
}
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::<NetworkEvent>("NetworkEvent", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for NetworkEvent {
}
impl ::std::default::Default for NetworkEvent {
fn default() -> Self {
NetworkEvent::UpdateNetworkType
}
}
impl ::protobuf::reflect::ProtobufValue for NetworkEvent {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0fevent_map.proto*%\n\x0cNetworkEvent\x12\x15\n\x11UpdateNetworkType\
\x10\0b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,8 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod network_state;
pub use network_state::*;
mod event_map;
pub use event_map::*;

View File

@ -1,247 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `network_state.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct NetworkState {
// message fields
pub ty: NetworkType,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a NetworkState {
fn default() -> &'a NetworkState {
<NetworkState as ::protobuf::Message>::default_instance()
}
}
impl NetworkState {
pub fn new() -> NetworkState {
::std::default::Default::default()
}
// .NetworkType ty = 1;
pub fn get_ty(&self) -> NetworkType {
self.ty
}
pub fn clear_ty(&mut self) {
self.ty = NetworkType::UnknownNetworkType;
}
// Param is passed by value, moved
pub fn set_ty(&mut self, v: NetworkType) {
self.ty = v;
}
}
impl ::protobuf::Message for NetworkState {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 1, &mut self.unknown_fields)?
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.ty != NetworkType::UnknownNetworkType {
my_size += ::protobuf::rt::enum_size(1, self.ty);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.ty != NetworkType::UnknownNetworkType {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.ty))?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> NetworkState {
NetworkState::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<NetworkType>>(
"ty",
|m: &NetworkState| { &m.ty },
|m: &mut NetworkState| { &mut m.ty },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<NetworkState>(
"NetworkState",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static NetworkState {
static instance: ::protobuf::rt::LazyV2<NetworkState> = ::protobuf::rt::LazyV2::INIT;
instance.get(NetworkState::new)
}
}
impl ::protobuf::Clear for NetworkState {
fn clear(&mut self) {
self.ty = NetworkType::UnknownNetworkType;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for NetworkState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NetworkState {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum NetworkType {
UnknownNetworkType = 0,
Wifi = 1,
Cell = 2,
Ethernet = 3,
}
impl ::protobuf::ProtobufEnum for NetworkType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<NetworkType> {
match value {
0 => ::std::option::Option::Some(NetworkType::UnknownNetworkType),
1 => ::std::option::Option::Some(NetworkType::Wifi),
2 => ::std::option::Option::Some(NetworkType::Cell),
3 => ::std::option::Option::Some(NetworkType::Ethernet),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [NetworkType] = &[
NetworkType::UnknownNetworkType,
NetworkType::Wifi,
NetworkType::Cell,
NetworkType::Ethernet,
];
values
}
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::<NetworkType>("NetworkType", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for NetworkType {
}
impl ::std::default::Default for NetworkType {
fn default() -> Self {
NetworkType::UnknownNetworkType
}
}
impl ::protobuf::reflect::ProtobufValue for NetworkType {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x13network_state.proto\",\n\x0cNetworkState\x12\x1c\n\x02ty\x18\x01\
\x20\x01(\x0e2\x0c.NetworkTypeR\x02ty*G\n\x0bNetworkType\x12\x16\n\x12Un\
knownNetworkType\x10\0\x12\x08\n\x04Wifi\x10\x01\x12\x08\n\x04Cell\x10\
\x02\x12\x0c\n\x08Ethernet\x10\x03b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,478 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `entities.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct ExportPayload {
// message fields
pub view_id: ::std::string::String,
pub export_type: ExportType,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ExportPayload {
fn default() -> &'a ExportPayload {
<ExportPayload as ::protobuf::Message>::default_instance()
}
}
impl ExportPayload {
pub fn new() -> ExportPayload {
::std::default::Default::default()
}
// string view_id = 1;
pub fn get_view_id(&self) -> &str {
&self.view_id
}
pub fn clear_view_id(&mut self) {
self.view_id.clear();
}
// Param is passed by value, moved
pub fn set_view_id(&mut self, v: ::std::string::String) {
self.view_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
&mut self.view_id
}
// Take field
pub fn take_view_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.view_id, ::std::string::String::new())
}
// .ExportType export_type = 2;
pub fn get_export_type(&self) -> ExportType {
self.export_type
}
pub fn clear_export_type(&mut self) {
self.export_type = ExportType::Text;
}
// Param is passed by value, moved
pub fn set_export_type(&mut self, v: ExportType) {
self.export_type = v;
}
}
impl ::protobuf::Message for ExportPayload {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_id)?;
},
2 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.export_type, 2, &mut self.unknown_fields)?
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.view_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.view_id);
}
if self.export_type != ExportType::Text {
my_size += ::protobuf::rt::enum_size(2, self.export_type);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.view_id.is_empty() {
os.write_string(1, &self.view_id)?;
}
if self.export_type != ExportType::Text {
os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.export_type))?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ExportPayload {
ExportPayload::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"view_id",
|m: &ExportPayload| { &m.view_id },
|m: &mut ExportPayload| { &mut m.view_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ExportType>>(
"export_type",
|m: &ExportPayload| { &m.export_type },
|m: &mut ExportPayload| { &mut m.export_type },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportPayload>(
"ExportPayload",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ExportPayload {
static instance: ::protobuf::rt::LazyV2<ExportPayload> = ::protobuf::rt::LazyV2::INIT;
instance.get(ExportPayload::new)
}
}
impl ::protobuf::Clear for ExportPayload {
fn clear(&mut self) {
self.view_id.clear();
self.export_type = ExportType::Text;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ExportPayload {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ExportPayload {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ExportData {
// message fields
pub data: ::std::string::String,
pub export_type: ExportType,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ExportData {
fn default() -> &'a ExportData {
<ExportData as ::protobuf::Message>::default_instance()
}
}
impl ExportData {
pub fn new() -> ExportData {
::std::default::Default::default()
}
// string data = 1;
pub fn get_data(&self) -> &str {
&self.data
}
pub fn clear_data(&mut self) {
self.data.clear();
}
// Param is passed by value, moved
pub fn set_data(&mut self, v: ::std::string::String) {
self.data = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_data(&mut self) -> &mut ::std::string::String {
&mut self.data
}
// Take field
pub fn take_data(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.data, ::std::string::String::new())
}
// .ExportType export_type = 2;
pub fn get_export_type(&self) -> ExportType {
self.export_type
}
pub fn clear_export_type(&mut self) {
self.export_type = ExportType::Text;
}
// Param is passed by value, moved
pub fn set_export_type(&mut self, v: ExportType) {
self.export_type = v;
}
}
impl ::protobuf::Message for ExportData {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data)?;
},
2 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.export_type, 2, &mut self.unknown_fields)?
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.data.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.data);
}
if self.export_type != ExportType::Text {
my_size += ::protobuf::rt::enum_size(2, self.export_type);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.data.is_empty() {
os.write_string(1, &self.data)?;
}
if self.export_type != ExportType::Text {
os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.export_type))?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ExportData {
ExportData::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"data",
|m: &ExportData| { &m.data },
|m: &mut ExportData| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ExportType>>(
"export_type",
|m: &ExportData| { &m.export_type },
|m: &mut ExportData| { &mut m.export_type },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportData>(
"ExportData",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ExportData {
static instance: ::protobuf::rt::LazyV2<ExportData> = ::protobuf::rt::LazyV2::INIT;
instance.get(ExportData::new)
}
}
impl ::protobuf::Clear for ExportData {
fn clear(&mut self) {
self.data.clear();
self.export_type = ExportType::Text;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ExportData {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ExportData {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ExportType {
Text = 0,
Markdown = 1,
Link = 2,
}
impl ::protobuf::ProtobufEnum for ExportType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ExportType> {
match value {
0 => ::std::option::Option::Some(ExportType::Text),
1 => ::std::option::Option::Some(ExportType::Markdown),
2 => ::std::option::Option::Some(ExportType::Link),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ExportType] = &[
ExportType::Text,
ExportType::Markdown,
ExportType::Link,
];
values
}
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::<ExportType>("ExportType", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for ExportType {
}
impl ::std::default::Default for ExportType {
fn default() -> Self {
ExportType::Text
}
}
impl ::protobuf::reflect::ProtobufValue for ExportType {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0eentities.proto\"V\n\rExportPayload\x12\x17\n\x07view_id\x18\x01\
\x20\x01(\tR\x06viewId\x12,\n\x0bexport_type\x18\x02\x20\x01(\x0e2\x0b.E\
xportTypeR\nexportType\"N\n\nExportData\x12\x12\n\x04data\x18\x01\x20\
\x01(\tR\x04data\x12,\n\x0bexport_type\x18\x02\x20\x01(\x0e2\x0b.ExportT\
ypeR\nexportType*.\n\nExportType\x12\x08\n\x04Text\x10\0\x12\x0c\n\x08Ma\
rkdown\x10\x01\x12\x08\n\x04Link\x10\x02b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,95 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `event_map.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum TextBlockEvent {
GetBlockData = 0,
ApplyDelta = 1,
ExportDocument = 2,
}
impl ::protobuf::ProtobufEnum for TextBlockEvent {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<TextBlockEvent> {
match value {
0 => ::std::option::Option::Some(TextBlockEvent::GetBlockData),
1 => ::std::option::Option::Some(TextBlockEvent::ApplyDelta),
2 => ::std::option::Option::Some(TextBlockEvent::ExportDocument),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [TextBlockEvent] = &[
TextBlockEvent::GetBlockData,
TextBlockEvent::ApplyDelta,
TextBlockEvent::ExportDocument,
];
values
}
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::<TextBlockEvent>("TextBlockEvent", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for TextBlockEvent {
}
impl ::std::default::Default for TextBlockEvent {
fn default() -> Self {
TextBlockEvent::GetBlockData
}
}
impl ::protobuf::reflect::ProtobufValue for TextBlockEvent {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0fevent_map.proto*F\n\x0eTextBlockEvent\x12\x10\n\x0cGetBlockData\
\x10\0\x12\x0e\n\nApplyDelta\x10\x01\x12\x12\n\x0eExportDocument\x10\x02\
b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,8 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod entities;
pub use entities::*;
mod event_map;
pub use event_map::*;

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,102 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `dart_notification.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum UserNotification {
Unknown = 0,
UserAuthChanged = 1,
UserProfileUpdated = 2,
UserUnauthorized = 3,
UserWsConnectStateChanged = 4,
}
impl ::protobuf::ProtobufEnum for UserNotification {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<UserNotification> {
match value {
0 => ::std::option::Option::Some(UserNotification::Unknown),
1 => ::std::option::Option::Some(UserNotification::UserAuthChanged),
2 => ::std::option::Option::Some(UserNotification::UserProfileUpdated),
3 => ::std::option::Option::Some(UserNotification::UserUnauthorized),
4 => ::std::option::Option::Some(UserNotification::UserWsConnectStateChanged),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [UserNotification] = &[
UserNotification::Unknown,
UserNotification::UserAuthChanged,
UserNotification::UserProfileUpdated,
UserNotification::UserUnauthorized,
UserNotification::UserWsConnectStateChanged,
];
values
}
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::<UserNotification>("UserNotification", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for UserNotification {
}
impl ::std::default::Default for UserNotification {
fn default() -> Self {
UserNotification::Unknown
}
}
impl ::protobuf::reflect::ProtobufValue for UserNotification {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x17dart_notification.proto*\x81\x01\n\x10UserNotification\x12\x0b\n\
\x07Unknown\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12User\
ProfileUpdated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\
\x19UserWsConnectStateChanged\x10\x04b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,115 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `event_map.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum UserEvent {
InitUser = 0,
SignIn = 1,
SignUp = 2,
SignOut = 3,
UpdateUser = 4,
GetUserProfile = 5,
CheckUser = 6,
SetAppearanceSetting = 7,
GetAppearanceSetting = 8,
}
impl ::protobuf::ProtobufEnum for UserEvent {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<UserEvent> {
match value {
0 => ::std::option::Option::Some(UserEvent::InitUser),
1 => ::std::option::Option::Some(UserEvent::SignIn),
2 => ::std::option::Option::Some(UserEvent::SignUp),
3 => ::std::option::Option::Some(UserEvent::SignOut),
4 => ::std::option::Option::Some(UserEvent::UpdateUser),
5 => ::std::option::Option::Some(UserEvent::GetUserProfile),
6 => ::std::option::Option::Some(UserEvent::CheckUser),
7 => ::std::option::Option::Some(UserEvent::SetAppearanceSetting),
8 => ::std::option::Option::Some(UserEvent::GetAppearanceSetting),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [UserEvent] = &[
UserEvent::InitUser,
UserEvent::SignIn,
UserEvent::SignUp,
UserEvent::SignOut,
UserEvent::UpdateUser,
UserEvent::GetUserProfile,
UserEvent::CheckUser,
UserEvent::SetAppearanceSetting,
UserEvent::GetAppearanceSetting,
];
values
}
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::<UserEvent>("UserEvent", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for UserEvent {
}
impl ::std::default::Default for UserEvent {
fn default() -> Self {
UserEvent::InitUser
}
}
impl ::protobuf::reflect::ProtobufValue for UserEvent {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0fevent_map.proto*\xa5\x01\n\tUserEvent\x12\x0c\n\x08InitUser\x10\0\
\x12\n\n\x06SignIn\x10\x01\x12\n\n\x06SignUp\x10\x02\x12\x0b\n\x07SignOu\
t\x10\x03\x12\x0e\n\nUpdateUser\x10\x04\x12\x12\n\x0eGetUserProfile\x10\
\x05\x12\r\n\tCheckUser\x10\x06\x12\x18\n\x14SetAppearanceSetting\x10\
\x07\x12\x18\n\x14GetAppearanceSetting\x10\x08b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,8 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod dart_notification;
pub use dart_notification::*;
mod event_map;
pub use event_map::*;

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,5 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod code;
pub use code::*;

View File

@ -1,48 +0,0 @@
syntax = "proto3";
enum ErrorCode {
Internal = 0;
UserUnauthorized = 2;
RecordNotFound = 3;
UserIdIsEmpty = 4;
WorkspaceNameInvalid = 100;
WorkspaceIdInvalid = 101;
AppColorStyleInvalid = 102;
WorkspaceDescTooLong = 103;
WorkspaceNameTooLong = 104;
AppIdInvalid = 110;
AppNameInvalid = 111;
ViewNameInvalid = 120;
ViewThumbnailInvalid = 121;
ViewIdInvalid = 122;
ViewDescTooLong = 123;
ViewDataInvalid = 124;
ViewNameTooLong = 125;
ConnectError = 200;
EmailIsEmpty = 300;
EmailFormatInvalid = 301;
EmailAlreadyExists = 302;
PasswordIsEmpty = 303;
PasswordTooLong = 304;
PasswordContainsForbidCharacters = 305;
PasswordFormatInvalid = 306;
PasswordNotMatch = 307;
UserNameTooLong = 308;
UserNameContainForbiddenCharacters = 309;
UserNameIsEmpty = 310;
UserIdInvalid = 311;
UserNotExist = 312;
TextTooLong = 400;
GridIdIsEmpty = 410;
BlockIdIsEmpty = 420;
RowIdIsEmpty = 430;
OptionIdIsEmpty = 431;
FieldIdIsEmpty = 440;
FieldDoesNotExist = 441;
SelectOptionNameIsEmpty = 442;
FieldNotExists = 443;
FieldInvalidOperation = 444;
TypeOptionDataIsEmpty = 450;
InvalidDateTimeFormat = 500;
UnexpectedEmptyString = 999;
InvalidData = 1000;
}

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,244 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `code.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ErrorCode {
Internal = 0,
UserUnauthorized = 2,
RecordNotFound = 3,
UserIdIsEmpty = 4,
WorkspaceNameInvalid = 100,
WorkspaceIdInvalid = 101,
AppColorStyleInvalid = 102,
WorkspaceDescTooLong = 103,
WorkspaceNameTooLong = 104,
AppIdInvalid = 110,
AppNameInvalid = 111,
ViewNameInvalid = 120,
ViewThumbnailInvalid = 121,
ViewIdInvalid = 122,
ViewDescTooLong = 123,
ViewDataInvalid = 124,
ViewNameTooLong = 125,
ConnectError = 200,
EmailIsEmpty = 300,
EmailFormatInvalid = 301,
EmailAlreadyExists = 302,
PasswordIsEmpty = 303,
PasswordTooLong = 304,
PasswordContainsForbidCharacters = 305,
PasswordFormatInvalid = 306,
PasswordNotMatch = 307,
UserNameTooLong = 308,
UserNameContainForbiddenCharacters = 309,
UserNameIsEmpty = 310,
UserIdInvalid = 311,
UserNotExist = 312,
TextTooLong = 400,
GridIdIsEmpty = 410,
BlockIdIsEmpty = 420,
RowIdIsEmpty = 430,
OptionIdIsEmpty = 431,
FieldIdIsEmpty = 440,
FieldDoesNotExist = 441,
SelectOptionNameIsEmpty = 442,
FieldNotExists = 443,
FieldInvalidOperation = 444,
TypeOptionDataIsEmpty = 450,
InvalidDateTimeFormat = 500,
UnexpectedEmptyString = 999,
InvalidData = 1000,
}
impl ::protobuf::ProtobufEnum for ErrorCode {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ErrorCode> {
match value {
0 => ::std::option::Option::Some(ErrorCode::Internal),
2 => ::std::option::Option::Some(ErrorCode::UserUnauthorized),
3 => ::std::option::Option::Some(ErrorCode::RecordNotFound),
4 => ::std::option::Option::Some(ErrorCode::UserIdIsEmpty),
100 => ::std::option::Option::Some(ErrorCode::WorkspaceNameInvalid),
101 => ::std::option::Option::Some(ErrorCode::WorkspaceIdInvalid),
102 => ::std::option::Option::Some(ErrorCode::AppColorStyleInvalid),
103 => ::std::option::Option::Some(ErrorCode::WorkspaceDescTooLong),
104 => ::std::option::Option::Some(ErrorCode::WorkspaceNameTooLong),
110 => ::std::option::Option::Some(ErrorCode::AppIdInvalid),
111 => ::std::option::Option::Some(ErrorCode::AppNameInvalid),
120 => ::std::option::Option::Some(ErrorCode::ViewNameInvalid),
121 => ::std::option::Option::Some(ErrorCode::ViewThumbnailInvalid),
122 => ::std::option::Option::Some(ErrorCode::ViewIdInvalid),
123 => ::std::option::Option::Some(ErrorCode::ViewDescTooLong),
124 => ::std::option::Option::Some(ErrorCode::ViewDataInvalid),
125 => ::std::option::Option::Some(ErrorCode::ViewNameTooLong),
200 => ::std::option::Option::Some(ErrorCode::ConnectError),
300 => ::std::option::Option::Some(ErrorCode::EmailIsEmpty),
301 => ::std::option::Option::Some(ErrorCode::EmailFormatInvalid),
302 => ::std::option::Option::Some(ErrorCode::EmailAlreadyExists),
303 => ::std::option::Option::Some(ErrorCode::PasswordIsEmpty),
304 => ::std::option::Option::Some(ErrorCode::PasswordTooLong),
305 => ::std::option::Option::Some(ErrorCode::PasswordContainsForbidCharacters),
306 => ::std::option::Option::Some(ErrorCode::PasswordFormatInvalid),
307 => ::std::option::Option::Some(ErrorCode::PasswordNotMatch),
308 => ::std::option::Option::Some(ErrorCode::UserNameTooLong),
309 => ::std::option::Option::Some(ErrorCode::UserNameContainForbiddenCharacters),
310 => ::std::option::Option::Some(ErrorCode::UserNameIsEmpty),
311 => ::std::option::Option::Some(ErrorCode::UserIdInvalid),
312 => ::std::option::Option::Some(ErrorCode::UserNotExist),
400 => ::std::option::Option::Some(ErrorCode::TextTooLong),
410 => ::std::option::Option::Some(ErrorCode::GridIdIsEmpty),
420 => ::std::option::Option::Some(ErrorCode::BlockIdIsEmpty),
430 => ::std::option::Option::Some(ErrorCode::RowIdIsEmpty),
431 => ::std::option::Option::Some(ErrorCode::OptionIdIsEmpty),
440 => ::std::option::Option::Some(ErrorCode::FieldIdIsEmpty),
441 => ::std::option::Option::Some(ErrorCode::FieldDoesNotExist),
442 => ::std::option::Option::Some(ErrorCode::SelectOptionNameIsEmpty),
443 => ::std::option::Option::Some(ErrorCode::FieldNotExists),
444 => ::std::option::Option::Some(ErrorCode::FieldInvalidOperation),
450 => ::std::option::Option::Some(ErrorCode::TypeOptionDataIsEmpty),
500 => ::std::option::Option::Some(ErrorCode::InvalidDateTimeFormat),
999 => ::std::option::Option::Some(ErrorCode::UnexpectedEmptyString),
1000 => ::std::option::Option::Some(ErrorCode::InvalidData),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ErrorCode] = &[
ErrorCode::Internal,
ErrorCode::UserUnauthorized,
ErrorCode::RecordNotFound,
ErrorCode::UserIdIsEmpty,
ErrorCode::WorkspaceNameInvalid,
ErrorCode::WorkspaceIdInvalid,
ErrorCode::AppColorStyleInvalid,
ErrorCode::WorkspaceDescTooLong,
ErrorCode::WorkspaceNameTooLong,
ErrorCode::AppIdInvalid,
ErrorCode::AppNameInvalid,
ErrorCode::ViewNameInvalid,
ErrorCode::ViewThumbnailInvalid,
ErrorCode::ViewIdInvalid,
ErrorCode::ViewDescTooLong,
ErrorCode::ViewDataInvalid,
ErrorCode::ViewNameTooLong,
ErrorCode::ConnectError,
ErrorCode::EmailIsEmpty,
ErrorCode::EmailFormatInvalid,
ErrorCode::EmailAlreadyExists,
ErrorCode::PasswordIsEmpty,
ErrorCode::PasswordTooLong,
ErrorCode::PasswordContainsForbidCharacters,
ErrorCode::PasswordFormatInvalid,
ErrorCode::PasswordNotMatch,
ErrorCode::UserNameTooLong,
ErrorCode::UserNameContainForbiddenCharacters,
ErrorCode::UserNameIsEmpty,
ErrorCode::UserIdInvalid,
ErrorCode::UserNotExist,
ErrorCode::TextTooLong,
ErrorCode::GridIdIsEmpty,
ErrorCode::BlockIdIsEmpty,
ErrorCode::RowIdIsEmpty,
ErrorCode::OptionIdIsEmpty,
ErrorCode::FieldIdIsEmpty,
ErrorCode::FieldDoesNotExist,
ErrorCode::SelectOptionNameIsEmpty,
ErrorCode::FieldNotExists,
ErrorCode::FieldInvalidOperation,
ErrorCode::TypeOptionDataIsEmpty,
ErrorCode::InvalidDateTimeFormat,
ErrorCode::UnexpectedEmptyString,
ErrorCode::InvalidData,
];
values
}
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::<ErrorCode>("ErrorCode", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for ErrorCode {
}
impl ::std::default::Default for ErrorCode {
fn default() -> Self {
ErrorCode::Internal
}
}
impl ::protobuf::reflect::ProtobufValue for ErrorCode {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\ncode.proto*\x9d\x08\n\tErrorCode\x12\x0c\n\x08Internal\x10\0\x12\x14\
\n\x10UserUnauthorized\x10\x02\x12\x12\n\x0eRecordNotFound\x10\x03\x12\
\x11\n\rUserIdIsEmpty\x10\x04\x12\x18\n\x14WorkspaceNameInvalid\x10d\x12\
\x16\n\x12WorkspaceIdInvalid\x10e\x12\x18\n\x14AppColorStyleInvalid\x10f\
\x12\x18\n\x14WorkspaceDescTooLong\x10g\x12\x18\n\x14WorkspaceNameTooLon\
g\x10h\x12\x10\n\x0cAppIdInvalid\x10n\x12\x12\n\x0eAppNameInvalid\x10o\
\x12\x13\n\x0fViewNameInvalid\x10x\x12\x18\n\x14ViewThumbnailInvalid\x10\
y\x12\x11\n\rViewIdInvalid\x10z\x12\x13\n\x0fViewDescTooLong\x10{\x12\
\x13\n\x0fViewDataInvalid\x10|\x12\x13\n\x0fViewNameTooLong\x10}\x12\x11\
\n\x0cConnectError\x10\xc8\x01\x12\x11\n\x0cEmailIsEmpty\x10\xac\x02\x12\
\x17\n\x12EmailFormatInvalid\x10\xad\x02\x12\x17\n\x12EmailAlreadyExists\
\x10\xae\x02\x12\x14\n\x0fPasswordIsEmpty\x10\xaf\x02\x12\x14\n\x0fPassw\
ordTooLong\x10\xb0\x02\x12%\n\x20PasswordContainsForbidCharacters\x10\
\xb1\x02\x12\x1a\n\x15PasswordFormatInvalid\x10\xb2\x02\x12\x15\n\x10Pas\
swordNotMatch\x10\xb3\x02\x12\x14\n\x0fUserNameTooLong\x10\xb4\x02\x12'\
\n\"UserNameContainForbiddenCharacters\x10\xb5\x02\x12\x14\n\x0fUserName\
IsEmpty\x10\xb6\x02\x12\x12\n\rUserIdInvalid\x10\xb7\x02\x12\x11\n\x0cUs\
erNotExist\x10\xb8\x02\x12\x10\n\x0bTextTooLong\x10\x90\x03\x12\x12\n\rG\
ridIdIsEmpty\x10\x9a\x03\x12\x13\n\x0eBlockIdIsEmpty\x10\xa4\x03\x12\x11\
\n\x0cRowIdIsEmpty\x10\xae\x03\x12\x14\n\x0fOptionIdIsEmpty\x10\xaf\x03\
\x12\x13\n\x0eFieldIdIsEmpty\x10\xb8\x03\x12\x16\n\x11FieldDoesNotExist\
\x10\xb9\x03\x12\x1c\n\x17SelectOptionNameIsEmpty\x10\xba\x03\x12\x13\n\
\x0eFieldNotExists\x10\xbb\x03\x12\x1a\n\x15FieldInvalidOperation\x10\
\xbc\x03\x12\x1a\n\x15TypeOptionDataIsEmpty\x10\xc2\x03\x12\x1a\n\x15Inv\
alidDateTimeFormat\x10\xf4\x03\x12\x1a\n\x15UnexpectedEmptyString\x10\
\xe7\x07\x12\x10\n\x0bInvalidData\x10\xe8\x07b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,5 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod code;
pub use code::*;

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod app;
pub use app::*;
mod view_info;
pub use view_info::*;
mod view;
pub use view::*;
mod trash;
pub use trash::*;
mod workspace;
pub use workspace::*;

View File

@ -1,962 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `trash.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct Trash {
// message fields
pub id: ::std::string::String,
pub name: ::std::string::String,
pub modified_time: i64,
pub create_time: i64,
pub ty: TrashType,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Trash {
fn default() -> &'a Trash {
<Trash as ::protobuf::Message>::default_instance()
}
}
impl Trash {
pub fn new() -> Trash {
::std::default::Default::default()
}
// string id = 1;
pub fn get_id(&self) -> &str {
&self.id
}
pub fn clear_id(&mut self) {
self.id.clear();
}
// Param is passed by value, moved
pub fn set_id(&mut self, v: ::std::string::String) {
self.id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_id(&mut self) -> &mut ::std::string::String {
&mut self.id
}
// Take field
pub fn take_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.id, ::std::string::String::new())
}
// string name = 2;
pub fn get_name(&self) -> &str {
&self.name
}
pub fn clear_name(&mut self) {
self.name.clear();
}
// Param is passed by value, moved
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_name(&mut self) -> &mut ::std::string::String {
&mut self.name
}
// Take field
pub fn take_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.name, ::std::string::String::new())
}
// int64 modified_time = 3;
pub fn get_modified_time(&self) -> i64 {
self.modified_time
}
pub fn clear_modified_time(&mut self) {
self.modified_time = 0;
}
// Param is passed by value, moved
pub fn set_modified_time(&mut self, v: i64) {
self.modified_time = v;
}
// int64 create_time = 4;
pub fn get_create_time(&self) -> i64 {
self.create_time
}
pub fn clear_create_time(&mut self) {
self.create_time = 0;
}
// Param is passed by value, moved
pub fn set_create_time(&mut self, v: i64) {
self.create_time = v;
}
// .TrashType ty = 5;
pub fn get_ty(&self) -> TrashType {
self.ty
}
pub fn clear_ty(&mut self) {
self.ty = TrashType::Unknown;
}
// Param is passed by value, moved
pub fn set_ty(&mut self, v: TrashType) {
self.ty = v;
}
}
impl ::protobuf::Message for Trash {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.modified_time = tmp;
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.create_time = tmp;
},
5 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 5, &mut self.unknown_fields)?
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.id);
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.name);
}
if self.modified_time != 0 {
my_size += ::protobuf::rt::value_size(3, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
}
if self.create_time != 0 {
my_size += ::protobuf::rt::value_size(4, self.create_time, ::protobuf::wire_format::WireTypeVarint);
}
if self.ty != TrashType::Unknown {
my_size += ::protobuf::rt::enum_size(5, self.ty);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.id.is_empty() {
os.write_string(1, &self.id)?;
}
if !self.name.is_empty() {
os.write_string(2, &self.name)?;
}
if self.modified_time != 0 {
os.write_int64(3, self.modified_time)?;
}
if self.create_time != 0 {
os.write_int64(4, self.create_time)?;
}
if self.ty != TrashType::Unknown {
os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.ty))?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Trash {
Trash::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"id",
|m: &Trash| { &m.id },
|m: &mut Trash| { &mut m.id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"name",
|m: &Trash| { &m.name },
|m: &mut Trash| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"modified_time",
|m: &Trash| { &m.modified_time },
|m: &mut Trash| { &mut m.modified_time },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"create_time",
|m: &Trash| { &m.create_time },
|m: &mut Trash| { &mut m.create_time },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TrashType>>(
"ty",
|m: &Trash| { &m.ty },
|m: &mut Trash| { &mut m.ty },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Trash>(
"Trash",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Trash {
static instance: ::protobuf::rt::LazyV2<Trash> = ::protobuf::rt::LazyV2::INIT;
instance.get(Trash::new)
}
}
impl ::protobuf::Clear for Trash {
fn clear(&mut self) {
self.id.clear();
self.name.clear();
self.modified_time = 0;
self.create_time = 0;
self.ty = TrashType::Unknown;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Trash {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Trash {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RepeatedTrash {
// message fields
pub items: ::protobuf::RepeatedField<Trash>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a RepeatedTrash {
fn default() -> &'a RepeatedTrash {
<RepeatedTrash as ::protobuf::Message>::default_instance()
}
}
impl RepeatedTrash {
pub fn new() -> RepeatedTrash {
::std::default::Default::default()
}
// repeated .Trash items = 1;
pub fn get_items(&self) -> &[Trash] {
&self.items
}
pub fn clear_items(&mut self) {
self.items.clear();
}
// Param is passed by value, moved
pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Trash>) {
self.items = v;
}
// Mutable pointer to the field.
pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Trash> {
&mut self.items
}
// Take field
pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Trash> {
::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for RepeatedTrash {
fn is_initialized(&self) -> bool {
for v in &self.items {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.items {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.items {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RepeatedTrash {
RepeatedTrash::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Trash>>(
"items",
|m: &RepeatedTrash| { &m.items },
|m: &mut RepeatedTrash| { &mut m.items },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedTrash>(
"RepeatedTrash",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static RepeatedTrash {
static instance: ::protobuf::rt::LazyV2<RepeatedTrash> = ::protobuf::rt::LazyV2::INIT;
instance.get(RepeatedTrash::new)
}
}
impl ::protobuf::Clear for RepeatedTrash {
fn clear(&mut self) {
self.items.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RepeatedTrash {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RepeatedTrash {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RepeatedTrashId {
// message fields
pub items: ::protobuf::RepeatedField<TrashId>,
pub delete_all: bool,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a RepeatedTrashId {
fn default() -> &'a RepeatedTrashId {
<RepeatedTrashId as ::protobuf::Message>::default_instance()
}
}
impl RepeatedTrashId {
pub fn new() -> RepeatedTrashId {
::std::default::Default::default()
}
// repeated .TrashId items = 1;
pub fn get_items(&self) -> &[TrashId] {
&self.items
}
pub fn clear_items(&mut self) {
self.items.clear();
}
// Param is passed by value, moved
pub fn set_items(&mut self, v: ::protobuf::RepeatedField<TrashId>) {
self.items = v;
}
// Mutable pointer to the field.
pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<TrashId> {
&mut self.items
}
// Take field
pub fn take_items(&mut self) -> ::protobuf::RepeatedField<TrashId> {
::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
}
// bool delete_all = 2;
pub fn get_delete_all(&self) -> bool {
self.delete_all
}
pub fn clear_delete_all(&mut self) {
self.delete_all = false;
}
// Param is passed by value, moved
pub fn set_delete_all(&mut self, v: bool) {
self.delete_all = v;
}
}
impl ::protobuf::Message for RepeatedTrashId {
fn is_initialized(&self) -> bool {
for v in &self.items {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.delete_all = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.items {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if self.delete_all != false {
my_size += 2;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.items {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if self.delete_all != false {
os.write_bool(2, self.delete_all)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RepeatedTrashId {
RepeatedTrashId::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TrashId>>(
"items",
|m: &RepeatedTrashId| { &m.items },
|m: &mut RepeatedTrashId| { &mut m.items },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"delete_all",
|m: &RepeatedTrashId| { &m.delete_all },
|m: &mut RepeatedTrashId| { &mut m.delete_all },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedTrashId>(
"RepeatedTrashId",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static RepeatedTrashId {
static instance: ::protobuf::rt::LazyV2<RepeatedTrashId> = ::protobuf::rt::LazyV2::INIT;
instance.get(RepeatedTrashId::new)
}
}
impl ::protobuf::Clear for RepeatedTrashId {
fn clear(&mut self) {
self.items.clear();
self.delete_all = false;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RepeatedTrashId {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RepeatedTrashId {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct TrashId {
// message fields
pub id: ::std::string::String,
pub ty: TrashType,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a TrashId {
fn default() -> &'a TrashId {
<TrashId as ::protobuf::Message>::default_instance()
}
}
impl TrashId {
pub fn new() -> TrashId {
::std::default::Default::default()
}
// string id = 1;
pub fn get_id(&self) -> &str {
&self.id
}
pub fn clear_id(&mut self) {
self.id.clear();
}
// Param is passed by value, moved
pub fn set_id(&mut self, v: ::std::string::String) {
self.id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_id(&mut self) -> &mut ::std::string::String {
&mut self.id
}
// Take field
pub fn take_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.id, ::std::string::String::new())
}
// .TrashType ty = 2;
pub fn get_ty(&self) -> TrashType {
self.ty
}
pub fn clear_ty(&mut self) {
self.ty = TrashType::Unknown;
}
// Param is passed by value, moved
pub fn set_ty(&mut self, v: TrashType) {
self.ty = v;
}
}
impl ::protobuf::Message for TrashId {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::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.ty, 2, &mut self.unknown_fields)?
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.id);
}
if self.ty != TrashType::Unknown {
my_size += ::protobuf::rt::enum_size(2, self.ty);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.id.is_empty() {
os.write_string(1, &self.id)?;
}
if self.ty != TrashType::Unknown {
os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> TrashId {
TrashId::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"id",
|m: &TrashId| { &m.id },
|m: &mut TrashId| { &mut m.id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TrashType>>(
"ty",
|m: &TrashId| { &m.ty },
|m: &mut TrashId| { &mut m.ty },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<TrashId>(
"TrashId",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static TrashId {
static instance: ::protobuf::rt::LazyV2<TrashId> = ::protobuf::rt::LazyV2::INIT;
instance.get(TrashId::new)
}
}
impl ::protobuf::Clear for TrashId {
fn clear(&mut self) {
self.id.clear();
self.ty = TrashType::Unknown;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for TrashId {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for TrashId {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum TrashType {
Unknown = 0,
TrashView = 1,
TrashApp = 2,
}
impl ::protobuf::ProtobufEnum for TrashType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<TrashType> {
match value {
0 => ::std::option::Option::Some(TrashType::Unknown),
1 => ::std::option::Option::Some(TrashType::TrashView),
2 => ::std::option::Option::Some(TrashType::TrashApp),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [TrashType] = &[
TrashType::Unknown,
TrashType::TrashView,
TrashType::TrashApp,
];
values
}
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::<TrashType>("TrashType", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for TrashType {
}
impl ::std::default::Default for TrashType {
fn default() -> Self {
TrashType::Unknown
}
}
impl ::protobuf::reflect::ProtobufValue for TrashType {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0btrash.proto\"\x8d\x01\n\x05Trash\x12\x0e\n\x02id\x18\x01\x20\x01(\
\tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12#\n\rmodified\
_time\x18\x03\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\
\x04\x20\x01(\x03R\ncreateTime\x12\x1a\n\x02ty\x18\x05\x20\x01(\x0e2\n.T\
rashTypeR\x02ty\"-\n\rRepeatedTrash\x12\x1c\n\x05items\x18\x01\x20\x03(\
\x0b2\x06.TrashR\x05items\"P\n\x0fRepeatedTrashId\x12\x1e\n\x05items\x18\
\x01\x20\x03(\x0b2\x08.TrashIdR\x05items\x12\x1d\n\ndelete_all\x18\x02\
\x20\x01(\x08R\tdeleteAll\"5\n\x07TrashId\x12\x0e\n\x02id\x18\x01\x20\
\x01(\tR\x02id\x12\x1a\n\x02ty\x18\x02\x20\x01(\x0e2\n.TrashTypeR\x02ty*\
5\n\tTrashType\x12\x0b\n\x07Unknown\x10\0\x12\r\n\tTrashView\x10\x01\x12\
\x0c\n\x08TrashApp\x10\x02b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

File diff suppressed because it is too large Load Diff

View File

@ -1,461 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `view_info.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct ViewInfo {
// message fields
pub id: ::std::string::String,
pub belong_to_id: ::std::string::String,
pub name: ::std::string::String,
pub desc: ::std::string::String,
pub data_type: super::view::ViewDataType,
pub belongings: ::protobuf::SingularPtrField<super::view::RepeatedView>,
pub ext_data: ::std::string::String,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ViewInfo {
fn default() -> &'a ViewInfo {
<ViewInfo as ::protobuf::Message>::default_instance()
}
}
impl ViewInfo {
pub fn new() -> ViewInfo {
::std::default::Default::default()
}
// string id = 1;
pub fn get_id(&self) -> &str {
&self.id
}
pub fn clear_id(&mut self) {
self.id.clear();
}
// Param is passed by value, moved
pub fn set_id(&mut self, v: ::std::string::String) {
self.id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_id(&mut self) -> &mut ::std::string::String {
&mut self.id
}
// Take field
pub fn take_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.id, ::std::string::String::new())
}
// string belong_to_id = 2;
pub fn get_belong_to_id(&self) -> &str {
&self.belong_to_id
}
pub fn clear_belong_to_id(&mut self) {
self.belong_to_id.clear();
}
// Param is passed by value, moved
pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
self.belong_to_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
&mut self.belong_to_id
}
// Take field
pub fn take_belong_to_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
}
// string name = 3;
pub fn get_name(&self) -> &str {
&self.name
}
pub fn clear_name(&mut self) {
self.name.clear();
}
// Param is passed by value, moved
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_name(&mut self) -> &mut ::std::string::String {
&mut self.name
}
// Take field
pub fn take_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.name, ::std::string::String::new())
}
// string desc = 4;
pub fn get_desc(&self) -> &str {
&self.desc
}
pub fn clear_desc(&mut self) {
self.desc.clear();
}
// Param is passed by value, moved
pub fn set_desc(&mut self, v: ::std::string::String) {
self.desc = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_desc(&mut self) -> &mut ::std::string::String {
&mut self.desc
}
// Take field
pub fn take_desc(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.desc, ::std::string::String::new())
}
// .ViewDataType data_type = 5;
pub fn get_data_type(&self) -> super::view::ViewDataType {
self.data_type
}
pub fn clear_data_type(&mut self) {
self.data_type = super::view::ViewDataType::TextBlock;
}
// Param is passed by value, moved
pub fn set_data_type(&mut self, v: super::view::ViewDataType) {
self.data_type = v;
}
// .RepeatedView belongings = 6;
pub fn get_belongings(&self) -> &super::view::RepeatedView {
self.belongings.as_ref().unwrap_or_else(|| <super::view::RepeatedView as ::protobuf::Message>::default_instance())
}
pub fn clear_belongings(&mut self) {
self.belongings.clear();
}
pub fn has_belongings(&self) -> bool {
self.belongings.is_some()
}
// Param is passed by value, moved
pub fn set_belongings(&mut self, v: super::view::RepeatedView) {
self.belongings = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_belongings(&mut self) -> &mut super::view::RepeatedView {
if self.belongings.is_none() {
self.belongings.set_default();
}
self.belongings.as_mut().unwrap()
}
// Take field
pub fn take_belongings(&mut self) -> super::view::RepeatedView {
self.belongings.take().unwrap_or_else(|| super::view::RepeatedView::new())
}
// string ext_data = 7;
pub fn get_ext_data(&self) -> &str {
&self.ext_data
}
pub fn clear_ext_data(&mut self) {
self.ext_data.clear();
}
// Param is passed by value, moved
pub fn set_ext_data(&mut self, v: ::std::string::String) {
self.ext_data = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_ext_data(&mut self) -> &mut ::std::string::String {
&mut self.ext_data
}
// Take field
pub fn take_ext_data(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.ext_data, ::std::string::String::new())
}
}
impl ::protobuf::Message for ViewInfo {
fn is_initialized(&self) -> bool {
for v in &self.belongings {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.belong_to_id)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
},
5 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.data_type, 5, &mut self.unknown_fields)?
},
6 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.belongings)?;
},
7 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ext_data)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.id);
}
if !self.belong_to_id.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.belong_to_id);
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.name);
}
if !self.desc.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.desc);
}
if self.data_type != super::view::ViewDataType::TextBlock {
my_size += ::protobuf::rt::enum_size(5, self.data_type);
}
if let Some(ref v) = self.belongings.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.ext_data.is_empty() {
my_size += ::protobuf::rt::string_size(7, &self.ext_data);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.id.is_empty() {
os.write_string(1, &self.id)?;
}
if !self.belong_to_id.is_empty() {
os.write_string(2, &self.belong_to_id)?;
}
if !self.name.is_empty() {
os.write_string(3, &self.name)?;
}
if !self.desc.is_empty() {
os.write_string(4, &self.desc)?;
}
if self.data_type != super::view::ViewDataType::TextBlock {
os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.data_type))?;
}
if let Some(ref v) = self.belongings.as_ref() {
os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.ext_data.is_empty() {
os.write_string(7, &self.ext_data)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ViewInfo {
ViewInfo::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"id",
|m: &ViewInfo| { &m.id },
|m: &mut ViewInfo| { &mut m.id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"belong_to_id",
|m: &ViewInfo| { &m.belong_to_id },
|m: &mut ViewInfo| { &mut m.belong_to_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"name",
|m: &ViewInfo| { &m.name },
|m: &mut ViewInfo| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"desc",
|m: &ViewInfo| { &m.desc },
|m: &mut ViewInfo| { &mut m.desc },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::view::ViewDataType>>(
"data_type",
|m: &ViewInfo| { &m.data_type },
|m: &mut ViewInfo| { &mut m.data_type },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::view::RepeatedView>>(
"belongings",
|m: &ViewInfo| { &m.belongings },
|m: &mut ViewInfo| { &mut m.belongings },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"ext_data",
|m: &ViewInfo| { &m.ext_data },
|m: &mut ViewInfo| { &mut m.ext_data },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewInfo>(
"ViewInfo",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ViewInfo {
static instance: ::protobuf::rt::LazyV2<ViewInfo> = ::protobuf::rt::LazyV2::INIT;
instance.get(ViewInfo::new)
}
}
impl ::protobuf::Clear for ViewInfo {
fn clear(&mut self) {
self.id.clear();
self.belong_to_id.clear();
self.name.clear();
self.desc.clear();
self.data_type = super::view::ViewDataType::TextBlock;
self.belongings.clear();
self.ext_data.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ViewInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ViewInfo {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0fview_info.proto\x1a\nview.proto\"\xda\x01\n\x08ViewInfo\x12\x0e\n\
\x02id\x18\x01\x20\x01(\tR\x02id\x12\x20\n\x0cbelong_to_id\x18\x02\x20\
\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\
\x12\n\x04desc\x18\x04\x20\x01(\tR\x04desc\x12*\n\tdata_type\x18\x05\x20\
\x01(\x0e2\r.ViewDataTypeR\x08dataType\x12-\n\nbelongings\x18\x06\x20\
\x01(\x0b2\r.RepeatedViewR\nbelongings\x12\x19\n\x08ext_data\x18\x07\x20\
\x01(\tR\x07extDatab\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod grid;
pub use grid::*;
mod grid_info;
pub use grid_info::*;
mod field;
pub use field::*;

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,314 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `folder_info.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct FolderInfo {
// message fields
pub folder_id: ::std::string::String,
pub text: ::std::string::String,
pub rev_id: i64,
pub base_rev_id: i64,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FolderInfo {
fn default() -> &'a FolderInfo {
<FolderInfo as ::protobuf::Message>::default_instance()
}
}
impl FolderInfo {
pub fn new() -> FolderInfo {
::std::default::Default::default()
}
// string folder_id = 1;
pub fn get_folder_id(&self) -> &str {
&self.folder_id
}
pub fn clear_folder_id(&mut self) {
self.folder_id.clear();
}
// Param is passed by value, moved
pub fn set_folder_id(&mut self, v: ::std::string::String) {
self.folder_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_folder_id(&mut self) -> &mut ::std::string::String {
&mut self.folder_id
}
// Take field
pub fn take_folder_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.folder_id, ::std::string::String::new())
}
// string text = 2;
pub fn get_text(&self) -> &str {
&self.text
}
pub fn clear_text(&mut self) {
self.text.clear();
}
// Param is passed by value, moved
pub fn set_text(&mut self, v: ::std::string::String) {
self.text = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_text(&mut self) -> &mut ::std::string::String {
&mut self.text
}
// Take field
pub fn take_text(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.text, ::std::string::String::new())
}
// int64 rev_id = 3;
pub fn get_rev_id(&self) -> i64 {
self.rev_id
}
pub fn clear_rev_id(&mut self) {
self.rev_id = 0;
}
// Param is passed by value, moved
pub fn set_rev_id(&mut self, v: i64) {
self.rev_id = v;
}
// int64 base_rev_id = 4;
pub fn get_base_rev_id(&self) -> i64 {
self.base_rev_id
}
pub fn clear_base_rev_id(&mut self) {
self.base_rev_id = 0;
}
// Param is passed by value, moved
pub fn set_base_rev_id(&mut self, v: i64) {
self.base_rev_id = v;
}
}
impl ::protobuf::Message for FolderInfo {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.folder_id)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.text)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.rev_id = tmp;
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.base_rev_id = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.folder_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.folder_id);
}
if !self.text.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.text);
}
if self.rev_id != 0 {
my_size += ::protobuf::rt::value_size(3, self.rev_id, ::protobuf::wire_format::WireTypeVarint);
}
if self.base_rev_id != 0 {
my_size += ::protobuf::rt::value_size(4, self.base_rev_id, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.folder_id.is_empty() {
os.write_string(1, &self.folder_id)?;
}
if !self.text.is_empty() {
os.write_string(2, &self.text)?;
}
if self.rev_id != 0 {
os.write_int64(3, self.rev_id)?;
}
if self.base_rev_id != 0 {
os.write_int64(4, self.base_rev_id)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FolderInfo {
FolderInfo::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"folder_id",
|m: &FolderInfo| { &m.folder_id },
|m: &mut FolderInfo| { &mut m.folder_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"text",
|m: &FolderInfo| { &m.text },
|m: &mut FolderInfo| { &mut m.text },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"rev_id",
|m: &FolderInfo| { &m.rev_id },
|m: &mut FolderInfo| { &mut m.rev_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"base_rev_id",
|m: &FolderInfo| { &m.base_rev_id },
|m: &mut FolderInfo| { &mut m.base_rev_id },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FolderInfo>(
"FolderInfo",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FolderInfo {
static instance: ::protobuf::rt::LazyV2<FolderInfo> = ::protobuf::rt::LazyV2::INIT;
instance.get(FolderInfo::new)
}
}
impl ::protobuf::Clear for FolderInfo {
fn clear(&mut self) {
self.folder_id.clear();
self.text.clear();
self.rev_id = 0;
self.base_rev_id = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FolderInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FolderInfo {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x11folder_info.proto\"t\n\nFolderInfo\x12\x1b\n\tfolder_id\x18\x01\
\x20\x01(\tR\x08folderId\x12\x12\n\x04text\x18\x02\x20\x01(\tR\x04text\
\x12\x15\n\x06rev_id\x18\x03\x20\x01(\x03R\x05revId\x12\x1e\n\x0bbase_re\
v_id\x18\x04\x20\x01(\x03R\tbaseRevIdb\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,14 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod folder_info;
pub use folder_info::*;
mod ws_data;
pub use ws_data::*;
mod text_block_info;
pub use text_block_info::*;
mod revision;
pub use revision::*;

View File

@ -1,992 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `revision.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct Revision {
// message fields
pub base_rev_id: i64,
pub rev_id: i64,
pub delta_data: ::std::vec::Vec<u8>,
pub md5: ::std::string::String,
pub object_id: ::std::string::String,
pub ty: RevType,
pub user_id: ::std::string::String,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Revision {
fn default() -> &'a Revision {
<Revision as ::protobuf::Message>::default_instance()
}
}
impl Revision {
pub fn new() -> Revision {
::std::default::Default::default()
}
// int64 base_rev_id = 1;
pub fn get_base_rev_id(&self) -> i64 {
self.base_rev_id
}
pub fn clear_base_rev_id(&mut self) {
self.base_rev_id = 0;
}
// Param is passed by value, moved
pub fn set_base_rev_id(&mut self, v: i64) {
self.base_rev_id = v;
}
// int64 rev_id = 2;
pub fn get_rev_id(&self) -> i64 {
self.rev_id
}
pub fn clear_rev_id(&mut self) {
self.rev_id = 0;
}
// Param is passed by value, moved
pub fn set_rev_id(&mut self, v: i64) {
self.rev_id = v;
}
// bytes delta_data = 3;
pub fn get_delta_data(&self) -> &[u8] {
&self.delta_data
}
pub fn clear_delta_data(&mut self) {
self.delta_data.clear();
}
// Param is passed by value, moved
pub fn set_delta_data(&mut self, v: ::std::vec::Vec<u8>) {
self.delta_data = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_delta_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.delta_data
}
// Take field
pub fn take_delta_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.delta_data, ::std::vec::Vec::new())
}
// string md5 = 4;
pub fn get_md5(&self) -> &str {
&self.md5
}
pub fn clear_md5(&mut self) {
self.md5.clear();
}
// Param is passed by value, moved
pub fn set_md5(&mut self, v: ::std::string::String) {
self.md5 = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_md5(&mut self) -> &mut ::std::string::String {
&mut self.md5
}
// Take field
pub fn take_md5(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.md5, ::std::string::String::new())
}
// string object_id = 5;
pub fn get_object_id(&self) -> &str {
&self.object_id
}
pub fn clear_object_id(&mut self) {
self.object_id.clear();
}
// Param is passed by value, moved
pub fn set_object_id(&mut self, v: ::std::string::String) {
self.object_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_object_id(&mut self) -> &mut ::std::string::String {
&mut self.object_id
}
// Take field
pub fn take_object_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.object_id, ::std::string::String::new())
}
// .RevType ty = 6;
pub fn get_ty(&self) -> RevType {
self.ty
}
pub fn clear_ty(&mut self) {
self.ty = RevType::DeprecatedLocal;
}
// Param is passed by value, moved
pub fn set_ty(&mut self, v: RevType) {
self.ty = v;
}
// string user_id = 7;
pub fn get_user_id(&self) -> &str {
&self.user_id
}
pub fn clear_user_id(&mut self) {
self.user_id.clear();
}
// Param is passed by value, moved
pub fn set_user_id(&mut self, v: ::std::string::String) {
self.user_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_user_id(&mut self) -> &mut ::std::string::String {
&mut self.user_id
}
// Take field
pub fn take_user_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.user_id, ::std::string::String::new())
}
}
impl ::protobuf::Message for Revision {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.base_rev_id = tmp;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.rev_id = tmp;
},
3 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.delta_data)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.md5)?;
},
5 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.object_id)?;
},
6 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 6, &mut self.unknown_fields)?
},
7 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_id)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.base_rev_id != 0 {
my_size += ::protobuf::rt::value_size(1, self.base_rev_id, ::protobuf::wire_format::WireTypeVarint);
}
if self.rev_id != 0 {
my_size += ::protobuf::rt::value_size(2, self.rev_id, ::protobuf::wire_format::WireTypeVarint);
}
if !self.delta_data.is_empty() {
my_size += ::protobuf::rt::bytes_size(3, &self.delta_data);
}
if !self.md5.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.md5);
}
if !self.object_id.is_empty() {
my_size += ::protobuf::rt::string_size(5, &self.object_id);
}
if self.ty != RevType::DeprecatedLocal {
my_size += ::protobuf::rt::enum_size(6, self.ty);
}
if !self.user_id.is_empty() {
my_size += ::protobuf::rt::string_size(7, &self.user_id);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.base_rev_id != 0 {
os.write_int64(1, self.base_rev_id)?;
}
if self.rev_id != 0 {
os.write_int64(2, self.rev_id)?;
}
if !self.delta_data.is_empty() {
os.write_bytes(3, &self.delta_data)?;
}
if !self.md5.is_empty() {
os.write_string(4, &self.md5)?;
}
if !self.object_id.is_empty() {
os.write_string(5, &self.object_id)?;
}
if self.ty != RevType::DeprecatedLocal {
os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.ty))?;
}
if !self.user_id.is_empty() {
os.write_string(7, &self.user_id)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Revision {
Revision::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"base_rev_id",
|m: &Revision| { &m.base_rev_id },
|m: &mut Revision| { &mut m.base_rev_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"rev_id",
|m: &Revision| { &m.rev_id },
|m: &mut Revision| { &mut m.rev_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"delta_data",
|m: &Revision| { &m.delta_data },
|m: &mut Revision| { &mut m.delta_data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"md5",
|m: &Revision| { &m.md5 },
|m: &mut Revision| { &mut m.md5 },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"object_id",
|m: &Revision| { &m.object_id },
|m: &mut Revision| { &mut m.object_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RevType>>(
"ty",
|m: &Revision| { &m.ty },
|m: &mut Revision| { &mut m.ty },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"user_id",
|m: &Revision| { &m.user_id },
|m: &mut Revision| { &mut m.user_id },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Revision>(
"Revision",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Revision {
static instance: ::protobuf::rt::LazyV2<Revision> = ::protobuf::rt::LazyV2::INIT;
instance.get(Revision::new)
}
}
impl ::protobuf::Clear for Revision {
fn clear(&mut self) {
self.base_rev_id = 0;
self.rev_id = 0;
self.delta_data.clear();
self.md5.clear();
self.object_id.clear();
self.ty = RevType::DeprecatedLocal;
self.user_id.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Revision {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Revision {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RepeatedRevision {
// message fields
pub items: ::protobuf::RepeatedField<Revision>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a RepeatedRevision {
fn default() -> &'a RepeatedRevision {
<RepeatedRevision as ::protobuf::Message>::default_instance()
}
}
impl RepeatedRevision {
pub fn new() -> RepeatedRevision {
::std::default::Default::default()
}
// repeated .Revision items = 1;
pub fn get_items(&self) -> &[Revision] {
&self.items
}
pub fn clear_items(&mut self) {
self.items.clear();
}
// Param is passed by value, moved
pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Revision>) {
self.items = v;
}
// Mutable pointer to the field.
pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Revision> {
&mut self.items
}
// Take field
pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Revision> {
::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for RepeatedRevision {
fn is_initialized(&self) -> bool {
for v in &self.items {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.items {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.items {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RepeatedRevision {
RepeatedRevision::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Revision>>(
"items",
|m: &RepeatedRevision| { &m.items },
|m: &mut RepeatedRevision| { &mut m.items },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedRevision>(
"RepeatedRevision",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static RepeatedRevision {
static instance: ::protobuf::rt::LazyV2<RepeatedRevision> = ::protobuf::rt::LazyV2::INIT;
instance.get(RepeatedRevision::new)
}
}
impl ::protobuf::Clear for RepeatedRevision {
fn clear(&mut self) {
self.items.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RepeatedRevision {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RepeatedRevision {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RevId {
// message fields
pub value: i64,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a RevId {
fn default() -> &'a RevId {
<RevId as ::protobuf::Message>::default_instance()
}
}
impl RevId {
pub fn new() -> RevId {
::std::default::Default::default()
}
// int64 value = 1;
pub fn get_value(&self) -> i64 {
self.value
}
pub fn clear_value(&mut self) {
self.value = 0;
}
// Param is passed by value, moved
pub fn set_value(&mut self, v: i64) {
self.value = v;
}
}
impl ::protobuf::Message for RevId {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.value = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.value != 0 {
my_size += ::protobuf::rt::value_size(1, self.value, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.value != 0 {
os.write_int64(1, self.value)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RevId {
RevId::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"value",
|m: &RevId| { &m.value },
|m: &mut RevId| { &mut m.value },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<RevId>(
"RevId",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static RevId {
static instance: ::protobuf::rt::LazyV2<RevId> = ::protobuf::rt::LazyV2::INIT;
instance.get(RevId::new)
}
}
impl ::protobuf::Clear for RevId {
fn clear(&mut self) {
self.value = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RevId {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RevId {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct RevisionRange {
// message fields
pub start: i64,
pub end: i64,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a RevisionRange {
fn default() -> &'a RevisionRange {
<RevisionRange as ::protobuf::Message>::default_instance()
}
}
impl RevisionRange {
pub fn new() -> RevisionRange {
::std::default::Default::default()
}
// int64 start = 1;
pub fn get_start(&self) -> i64 {
self.start
}
pub fn clear_start(&mut self) {
self.start = 0;
}
// Param is passed by value, moved
pub fn set_start(&mut self, v: i64) {
self.start = v;
}
// int64 end = 2;
pub fn get_end(&self) -> i64 {
self.end
}
pub fn clear_end(&mut self) {
self.end = 0;
}
// Param is passed by value, moved
pub fn set_end(&mut self, v: i64) {
self.end = v;
}
}
impl ::protobuf::Message for RevisionRange {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.start = tmp;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.end = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.start != 0 {
my_size += ::protobuf::rt::value_size(1, self.start, ::protobuf::wire_format::WireTypeVarint);
}
if self.end != 0 {
my_size += ::protobuf::rt::value_size(2, self.end, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.start != 0 {
os.write_int64(1, self.start)?;
}
if self.end != 0 {
os.write_int64(2, self.end)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> RevisionRange {
RevisionRange::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"start",
|m: &RevisionRange| { &m.start },
|m: &mut RevisionRange| { &mut m.start },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"end",
|m: &RevisionRange| { &m.end },
|m: &mut RevisionRange| { &mut m.end },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<RevisionRange>(
"RevisionRange",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static RevisionRange {
static instance: ::protobuf::rt::LazyV2<RevisionRange> = ::protobuf::rt::LazyV2::INIT;
instance.get(RevisionRange::new)
}
}
impl ::protobuf::Clear for RevisionRange {
fn clear(&mut self) {
self.start = 0;
self.end = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for RevisionRange {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for RevisionRange {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum RevType {
DeprecatedLocal = 0,
DeprecatedRemote = 1,
}
impl ::protobuf::ProtobufEnum for RevType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<RevType> {
match value {
0 => ::std::option::Option::Some(RevType::DeprecatedLocal),
1 => ::std::option::Option::Some(RevType::DeprecatedRemote),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [RevType] = &[
RevType::DeprecatedLocal,
RevType::DeprecatedRemote,
];
values
}
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::<RevType>("RevType", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for RevType {
}
impl ::std::default::Default for RevType {
fn default() -> Self {
RevType::DeprecatedLocal
}
}
impl ::protobuf::reflect::ProtobufValue for RevType {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0erevision.proto\"\xc2\x01\n\x08Revision\x12\x1e\n\x0bbase_rev_id\
\x18\x01\x20\x01(\x03R\tbaseRevId\x12\x15\n\x06rev_id\x18\x02\x20\x01(\
\x03R\x05revId\x12\x1d\n\ndelta_data\x18\x03\x20\x01(\x0cR\tdeltaData\
\x12\x10\n\x03md5\x18\x04\x20\x01(\tR\x03md5\x12\x1b\n\tobject_id\x18\
\x05\x20\x01(\tR\x08objectId\x12\x18\n\x02ty\x18\x06\x20\x01(\x0e2\x08.R\
evTypeR\x02ty\x12\x17\n\x07user_id\x18\x07\x20\x01(\tR\x06userId\"3\n\
\x10RepeatedRevision\x12\x1f\n\x05items\x18\x01\x20\x03(\x0b2\t.Revision\
R\x05items\"\x1d\n\x05RevId\x12\x14\n\x05value\x18\x01\x20\x01(\x03R\x05\
value\"7\n\rRevisionRange\x12\x14\n\x05start\x18\x01\x20\x01(\x03R\x05st\
art\x12\x10\n\x03end\x18\x02\x20\x01(\x03R\x03end*4\n\x07RevType\x12\x13\
\n\x0fDeprecatedLocal\x10\0\x12\x14\n\x10DeprecatedRemote\x10\x01b\x06pr\
oto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

File diff suppressed because it is too large Load Diff

View File

@ -1,923 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `ws_data.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct ClientRevisionWSData {
// message fields
pub object_id: ::std::string::String,
pub ty: ClientRevisionWSDataType,
pub revisions: ::protobuf::SingularPtrField<super::revision::RepeatedRevision>,
pub data_id: ::std::string::String,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ClientRevisionWSData {
fn default() -> &'a ClientRevisionWSData {
<ClientRevisionWSData as ::protobuf::Message>::default_instance()
}
}
impl ClientRevisionWSData {
pub fn new() -> ClientRevisionWSData {
::std::default::Default::default()
}
// string object_id = 1;
pub fn get_object_id(&self) -> &str {
&self.object_id
}
pub fn clear_object_id(&mut self) {
self.object_id.clear();
}
// Param is passed by value, moved
pub fn set_object_id(&mut self, v: ::std::string::String) {
self.object_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_object_id(&mut self) -> &mut ::std::string::String {
&mut self.object_id
}
// Take field
pub fn take_object_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.object_id, ::std::string::String::new())
}
// .ClientRevisionWSDataType ty = 2;
pub fn get_ty(&self) -> ClientRevisionWSDataType {
self.ty
}
pub fn clear_ty(&mut self) {
self.ty = ClientRevisionWSDataType::ClientPushRev;
}
// Param is passed by value, moved
pub fn set_ty(&mut self, v: ClientRevisionWSDataType) {
self.ty = v;
}
// .RepeatedRevision revisions = 3;
pub fn get_revisions(&self) -> &super::revision::RepeatedRevision {
self.revisions.as_ref().unwrap_or_else(|| <super::revision::RepeatedRevision as ::protobuf::Message>::default_instance())
}
pub fn clear_revisions(&mut self) {
self.revisions.clear();
}
pub fn has_revisions(&self) -> bool {
self.revisions.is_some()
}
// Param is passed by value, moved
pub fn set_revisions(&mut self, v: super::revision::RepeatedRevision) {
self.revisions = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_revisions(&mut self) -> &mut super::revision::RepeatedRevision {
if self.revisions.is_none() {
self.revisions.set_default();
}
self.revisions.as_mut().unwrap()
}
// Take field
pub fn take_revisions(&mut self) -> super::revision::RepeatedRevision {
self.revisions.take().unwrap_or_else(|| super::revision::RepeatedRevision::new())
}
// string data_id = 4;
pub fn get_data_id(&self) -> &str {
&self.data_id
}
pub fn clear_data_id(&mut self) {
self.data_id.clear();
}
// Param is passed by value, moved
pub fn set_data_id(&mut self, v: ::std::string::String) {
self.data_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_data_id(&mut self) -> &mut ::std::string::String {
&mut self.data_id
}
// Take field
pub fn take_data_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.data_id, ::std::string::String::new())
}
}
impl ::protobuf::Message for ClientRevisionWSData {
fn is_initialized(&self) -> bool {
for v in &self.revisions {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.object_id)?;
},
2 => {
::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_message_into(wire_type, is, &mut self.revisions)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data_id)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.object_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.object_id);
}
if self.ty != ClientRevisionWSDataType::ClientPushRev {
my_size += ::protobuf::rt::enum_size(2, self.ty);
}
if let Some(ref v) = self.revisions.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.data_id.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.data_id);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.object_id.is_empty() {
os.write_string(1, &self.object_id)?;
}
if self.ty != ClientRevisionWSDataType::ClientPushRev {
os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
}
if let Some(ref v) = self.revisions.as_ref() {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.data_id.is_empty() {
os.write_string(4, &self.data_id)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ClientRevisionWSData {
ClientRevisionWSData::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"object_id",
|m: &ClientRevisionWSData| { &m.object_id },
|m: &mut ClientRevisionWSData| { &mut m.object_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ClientRevisionWSDataType>>(
"ty",
|m: &ClientRevisionWSData| { &m.ty },
|m: &mut ClientRevisionWSData| { &mut m.ty },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::revision::RepeatedRevision>>(
"revisions",
|m: &ClientRevisionWSData| { &m.revisions },
|m: &mut ClientRevisionWSData| { &mut m.revisions },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"data_id",
|m: &ClientRevisionWSData| { &m.data_id },
|m: &mut ClientRevisionWSData| { &mut m.data_id },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ClientRevisionWSData>(
"ClientRevisionWSData",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ClientRevisionWSData {
static instance: ::protobuf::rt::LazyV2<ClientRevisionWSData> = ::protobuf::rt::LazyV2::INIT;
instance.get(ClientRevisionWSData::new)
}
}
impl ::protobuf::Clear for ClientRevisionWSData {
fn clear(&mut self) {
self.object_id.clear();
self.ty = ClientRevisionWSDataType::ClientPushRev;
self.revisions.clear();
self.data_id.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ClientRevisionWSData {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ClientRevisionWSData {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ServerRevisionWSData {
// message fields
pub object_id: ::std::string::String,
pub ty: ServerRevisionWSDataType,
pub data: ::std::vec::Vec<u8>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ServerRevisionWSData {
fn default() -> &'a ServerRevisionWSData {
<ServerRevisionWSData as ::protobuf::Message>::default_instance()
}
}
impl ServerRevisionWSData {
pub fn new() -> ServerRevisionWSData {
::std::default::Default::default()
}
// string object_id = 1;
pub fn get_object_id(&self) -> &str {
&self.object_id
}
pub fn clear_object_id(&mut self) {
self.object_id.clear();
}
// Param is passed by value, moved
pub fn set_object_id(&mut self, v: ::std::string::String) {
self.object_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_object_id(&mut self) -> &mut ::std::string::String {
&mut self.object_id
}
// Take field
pub fn take_object_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.object_id, ::std::string::String::new())
}
// .ServerRevisionWSDataType ty = 2;
pub fn get_ty(&self) -> ServerRevisionWSDataType {
self.ty
}
pub fn clear_ty(&mut self) {
self.ty = ServerRevisionWSDataType::ServerAck;
}
// Param is passed by value, moved
pub fn set_ty(&mut self, v: ServerRevisionWSDataType) {
self.ty = v;
}
// bytes data = 3;
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_data(&mut self) {
self.data.clear();
}
// Param is passed by value, moved
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
// Take field
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for ServerRevisionWSData {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.object_id)?;
},
2 => {
::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)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.object_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.object_id);
}
if self.ty != ServerRevisionWSDataType::ServerAck {
my_size += ::protobuf::rt::enum_size(2, self.ty);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(3, &self.data);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.object_id.is_empty() {
os.write_string(1, &self.object_id)?;
}
if self.ty != ServerRevisionWSDataType::ServerAck {
os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
}
if !self.data.is_empty() {
os.write_bytes(3, &self.data)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ServerRevisionWSData {
ServerRevisionWSData::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"object_id",
|m: &ServerRevisionWSData| { &m.object_id },
|m: &mut ServerRevisionWSData| { &mut m.object_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ServerRevisionWSDataType>>(
"ty",
|m: &ServerRevisionWSData| { &m.ty },
|m: &mut ServerRevisionWSData| { &mut m.ty },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &ServerRevisionWSData| { &m.data },
|m: &mut ServerRevisionWSData| { &mut m.data },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ServerRevisionWSData>(
"ServerRevisionWSData",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ServerRevisionWSData {
static instance: ::protobuf::rt::LazyV2<ServerRevisionWSData> = ::protobuf::rt::LazyV2::INIT;
instance.get(ServerRevisionWSData::new)
}
}
impl ::protobuf::Clear for ServerRevisionWSData {
fn clear(&mut self) {
self.object_id.clear();
self.ty = ServerRevisionWSDataType::ServerAck;
self.data.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ServerRevisionWSData {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ServerRevisionWSData {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct NewDocumentUser {
// message fields
pub user_id: ::std::string::String,
pub doc_id: ::std::string::String,
pub revision_data: ::std::vec::Vec<u8>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a NewDocumentUser {
fn default() -> &'a NewDocumentUser {
<NewDocumentUser as ::protobuf::Message>::default_instance()
}
}
impl NewDocumentUser {
pub fn new() -> NewDocumentUser {
::std::default::Default::default()
}
// string user_id = 1;
pub fn get_user_id(&self) -> &str {
&self.user_id
}
pub fn clear_user_id(&mut self) {
self.user_id.clear();
}
// Param is passed by value, moved
pub fn set_user_id(&mut self, v: ::std::string::String) {
self.user_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_user_id(&mut self) -> &mut ::std::string::String {
&mut self.user_id
}
// Take field
pub fn take_user_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.user_id, ::std::string::String::new())
}
// string doc_id = 2;
pub fn get_doc_id(&self) -> &str {
&self.doc_id
}
pub fn clear_doc_id(&mut self) {
self.doc_id.clear();
}
// Param is passed by value, moved
pub fn set_doc_id(&mut self, v: ::std::string::String) {
self.doc_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_doc_id(&mut self) -> &mut ::std::string::String {
&mut self.doc_id
}
// Take field
pub fn take_doc_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.doc_id, ::std::string::String::new())
}
// bytes revision_data = 3;
pub fn get_revision_data(&self) -> &[u8] {
&self.revision_data
}
pub fn clear_revision_data(&mut self) {
self.revision_data.clear();
}
// Param is passed by value, moved
pub fn set_revision_data(&mut self, v: ::std::vec::Vec<u8>) {
self.revision_data = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_revision_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.revision_data
}
// Take field
pub fn take_revision_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.revision_data, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for NewDocumentUser {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_id)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_id)?;
},
3 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.revision_data)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.user_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.user_id);
}
if !self.doc_id.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.doc_id);
}
if !self.revision_data.is_empty() {
my_size += ::protobuf::rt::bytes_size(3, &self.revision_data);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.user_id.is_empty() {
os.write_string(1, &self.user_id)?;
}
if !self.doc_id.is_empty() {
os.write_string(2, &self.doc_id)?;
}
if !self.revision_data.is_empty() {
os.write_bytes(3, &self.revision_data)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> NewDocumentUser {
NewDocumentUser::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"user_id",
|m: &NewDocumentUser| { &m.user_id },
|m: &mut NewDocumentUser| { &mut m.user_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"doc_id",
|m: &NewDocumentUser| { &m.doc_id },
|m: &mut NewDocumentUser| { &mut m.doc_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"revision_data",
|m: &NewDocumentUser| { &m.revision_data },
|m: &mut NewDocumentUser| { &mut m.revision_data },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<NewDocumentUser>(
"NewDocumentUser",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static NewDocumentUser {
static instance: ::protobuf::rt::LazyV2<NewDocumentUser> = ::protobuf::rt::LazyV2::INIT;
instance.get(NewDocumentUser::new)
}
}
impl ::protobuf::Clear for NewDocumentUser {
fn clear(&mut self) {
self.user_id.clear();
self.doc_id.clear();
self.revision_data.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for NewDocumentUser {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NewDocumentUser {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ClientRevisionWSDataType {
ClientPushRev = 0,
ClientPing = 1,
}
impl ::protobuf::ProtobufEnum for ClientRevisionWSDataType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ClientRevisionWSDataType> {
match value {
0 => ::std::option::Option::Some(ClientRevisionWSDataType::ClientPushRev),
1 => ::std::option::Option::Some(ClientRevisionWSDataType::ClientPing),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ClientRevisionWSDataType] = &[
ClientRevisionWSDataType::ClientPushRev,
ClientRevisionWSDataType::ClientPing,
];
values
}
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::<ClientRevisionWSDataType>("ClientRevisionWSDataType", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for ClientRevisionWSDataType {
}
impl ::std::default::Default for ClientRevisionWSDataType {
fn default() -> Self {
ClientRevisionWSDataType::ClientPushRev
}
}
impl ::protobuf::reflect::ProtobufValue for ClientRevisionWSDataType {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ServerRevisionWSDataType {
ServerAck = 0,
ServerPushRev = 1,
ServerPullRev = 2,
UserConnect = 3,
}
impl ::protobuf::ProtobufEnum for ServerRevisionWSDataType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ServerRevisionWSDataType> {
match value {
0 => ::std::option::Option::Some(ServerRevisionWSDataType::ServerAck),
1 => ::std::option::Option::Some(ServerRevisionWSDataType::ServerPushRev),
2 => ::std::option::Option::Some(ServerRevisionWSDataType::ServerPullRev),
3 => ::std::option::Option::Some(ServerRevisionWSDataType::UserConnect),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ServerRevisionWSDataType] = &[
ServerRevisionWSDataType::ServerAck,
ServerRevisionWSDataType::ServerPushRev,
ServerRevisionWSDataType::ServerPullRev,
ServerRevisionWSDataType::UserConnect,
];
values
}
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::<ServerRevisionWSDataType>("ServerRevisionWSDataType", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for ServerRevisionWSDataType {
}
impl ::std::default::Default for ServerRevisionWSDataType {
fn default() -> Self {
ServerRevisionWSDataType::ServerAck
}
}
impl ::protobuf::reflect::ProtobufValue for ServerRevisionWSDataType {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\rws_data.proto\x1a\x0erevision.proto\"\xa8\x01\n\x14ClientRevisionWSD\
ata\x12\x1b\n\tobject_id\x18\x01\x20\x01(\tR\x08objectId\x12)\n\x02ty\
\x18\x02\x20\x01(\x0e2\x19.ClientRevisionWSDataTypeR\x02ty\x12/\n\trevis\
ions\x18\x03\x20\x01(\x0b2\x11.RepeatedRevisionR\trevisions\x12\x17\n\
\x07data_id\x18\x04\x20\x01(\tR\x06dataId\"r\n\x14ServerRevisionWSData\
\x12\x1b\n\tobject_id\x18\x01\x20\x01(\tR\x08objectId\x12)\n\x02ty\x18\
\x02\x20\x01(\x0e2\x19.ServerRevisionWSDataTypeR\x02ty\x12\x12\n\x04data\
\x18\x03\x20\x01(\x0cR\x04data\"f\n\x0fNewDocumentUser\x12\x17\n\x07user\
_id\x18\x01\x20\x01(\tR\x06userId\x12\x15\n\x06doc_id\x18\x02\x20\x01(\t\
R\x05docId\x12#\n\rrevision_data\x18\x03\x20\x01(\x0cR\x0crevisionData*=\
\n\x18ClientRevisionWSDataType\x12\x11\n\rClientPushRev\x10\0\x12\x0e\n\
\nClientPing\x10\x01*`\n\x18ServerRevisionWSDataType\x12\r\n\tServerAck\
\x10\0\x12\x11\n\rServerPushRev\x10\x01\x12\x11\n\rServerPullRev\x10\x02\
\x12\x0f\n\x0bUserConnect\x10\x03b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod user_profile;
pub use user_profile::*;
mod auth;
pub use auth::*;
mod user_setting;
pub use user_setting::*;

View File

@ -1,715 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `user_setting.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct UserPreferences {
// message fields
pub user_id: ::std::string::String,
pub appearance_setting: ::protobuf::SingularPtrField<AppearanceSettings>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a UserPreferences {
fn default() -> &'a UserPreferences {
<UserPreferences as ::protobuf::Message>::default_instance()
}
}
impl UserPreferences {
pub fn new() -> UserPreferences {
::std::default::Default::default()
}
// string user_id = 1;
pub fn get_user_id(&self) -> &str {
&self.user_id
}
pub fn clear_user_id(&mut self) {
self.user_id.clear();
}
// Param is passed by value, moved
pub fn set_user_id(&mut self, v: ::std::string::String) {
self.user_id = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_user_id(&mut self) -> &mut ::std::string::String {
&mut self.user_id
}
// Take field
pub fn take_user_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.user_id, ::std::string::String::new())
}
// .AppearanceSettings appearance_setting = 2;
pub fn get_appearance_setting(&self) -> &AppearanceSettings {
self.appearance_setting.as_ref().unwrap_or_else(|| <AppearanceSettings as ::protobuf::Message>::default_instance())
}
pub fn clear_appearance_setting(&mut self) {
self.appearance_setting.clear();
}
pub fn has_appearance_setting(&self) -> bool {
self.appearance_setting.is_some()
}
// Param is passed by value, moved
pub fn set_appearance_setting(&mut self, v: AppearanceSettings) {
self.appearance_setting = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_appearance_setting(&mut self) -> &mut AppearanceSettings {
if self.appearance_setting.is_none() {
self.appearance_setting.set_default();
}
self.appearance_setting.as_mut().unwrap()
}
// Take field
pub fn take_appearance_setting(&mut self) -> AppearanceSettings {
self.appearance_setting.take().unwrap_or_else(|| AppearanceSettings::new())
}
}
impl ::protobuf::Message for UserPreferences {
fn is_initialized(&self) -> bool {
for v in &self.appearance_setting {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_id)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.appearance_setting)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.user_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.user_id);
}
if let Some(ref v) = self.appearance_setting.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.user_id.is_empty() {
os.write_string(1, &self.user_id)?;
}
if let Some(ref v) = self.appearance_setting.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> UserPreferences {
UserPreferences::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"user_id",
|m: &UserPreferences| { &m.user_id },
|m: &mut UserPreferences| { &mut m.user_id },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AppearanceSettings>>(
"appearance_setting",
|m: &UserPreferences| { &m.appearance_setting },
|m: &mut UserPreferences| { &mut m.appearance_setting },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<UserPreferences>(
"UserPreferences",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static UserPreferences {
static instance: ::protobuf::rt::LazyV2<UserPreferences> = ::protobuf::rt::LazyV2::INIT;
instance.get(UserPreferences::new)
}
}
impl ::protobuf::Clear for UserPreferences {
fn clear(&mut self) {
self.user_id.clear();
self.appearance_setting.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for UserPreferences {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for UserPreferences {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct AppearanceSettings {
// message fields
pub theme: ::std::string::String,
pub locale: ::protobuf::SingularPtrField<LocaleSettings>,
pub reset_as_default: bool,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a AppearanceSettings {
fn default() -> &'a AppearanceSettings {
<AppearanceSettings as ::protobuf::Message>::default_instance()
}
}
impl AppearanceSettings {
pub fn new() -> AppearanceSettings {
::std::default::Default::default()
}
// string theme = 1;
pub fn get_theme(&self) -> &str {
&self.theme
}
pub fn clear_theme(&mut self) {
self.theme.clear();
}
// Param is passed by value, moved
pub fn set_theme(&mut self, v: ::std::string::String) {
self.theme = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_theme(&mut self) -> &mut ::std::string::String {
&mut self.theme
}
// Take field
pub fn take_theme(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.theme, ::std::string::String::new())
}
// .LocaleSettings locale = 2;
pub fn get_locale(&self) -> &LocaleSettings {
self.locale.as_ref().unwrap_or_else(|| <LocaleSettings as ::protobuf::Message>::default_instance())
}
pub fn clear_locale(&mut self) {
self.locale.clear();
}
pub fn has_locale(&self) -> bool {
self.locale.is_some()
}
// Param is passed by value, moved
pub fn set_locale(&mut self, v: LocaleSettings) {
self.locale = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_locale(&mut self) -> &mut LocaleSettings {
if self.locale.is_none() {
self.locale.set_default();
}
self.locale.as_mut().unwrap()
}
// Take field
pub fn take_locale(&mut self) -> LocaleSettings {
self.locale.take().unwrap_or_else(|| LocaleSettings::new())
}
// bool reset_as_default = 3;
pub fn get_reset_as_default(&self) -> bool {
self.reset_as_default
}
pub fn clear_reset_as_default(&mut self) {
self.reset_as_default = false;
}
// Param is passed by value, moved
pub fn set_reset_as_default(&mut self, v: bool) {
self.reset_as_default = v;
}
}
impl ::protobuf::Message for AppearanceSettings {
fn is_initialized(&self) -> bool {
for v in &self.locale {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.theme)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.locale)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.reset_as_default = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.theme.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.theme);
}
if let Some(ref v) = self.locale.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.reset_as_default != false {
my_size += 2;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.theme.is_empty() {
os.write_string(1, &self.theme)?;
}
if let Some(ref v) = self.locale.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.reset_as_default != false {
os.write_bool(3, self.reset_as_default)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> AppearanceSettings {
AppearanceSettings::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"theme",
|m: &AppearanceSettings| { &m.theme },
|m: &mut AppearanceSettings| { &mut m.theme },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LocaleSettings>>(
"locale",
|m: &AppearanceSettings| { &m.locale },
|m: &mut AppearanceSettings| { &mut m.locale },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"reset_as_default",
|m: &AppearanceSettings| { &m.reset_as_default },
|m: &mut AppearanceSettings| { &mut m.reset_as_default },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<AppearanceSettings>(
"AppearanceSettings",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static AppearanceSettings {
static instance: ::protobuf::rt::LazyV2<AppearanceSettings> = ::protobuf::rt::LazyV2::INIT;
instance.get(AppearanceSettings::new)
}
}
impl ::protobuf::Clear for AppearanceSettings {
fn clear(&mut self) {
self.theme.clear();
self.locale.clear();
self.reset_as_default = false;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for AppearanceSettings {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for AppearanceSettings {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct LocaleSettings {
// message fields
pub language_code: ::std::string::String,
pub country_code: ::std::string::String,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LocaleSettings {
fn default() -> &'a LocaleSettings {
<LocaleSettings as ::protobuf::Message>::default_instance()
}
}
impl LocaleSettings {
pub fn new() -> LocaleSettings {
::std::default::Default::default()
}
// string language_code = 1;
pub fn get_language_code(&self) -> &str {
&self.language_code
}
pub fn clear_language_code(&mut self) {
self.language_code.clear();
}
// Param is passed by value, moved
pub fn set_language_code(&mut self, v: ::std::string::String) {
self.language_code = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_language_code(&mut self) -> &mut ::std::string::String {
&mut self.language_code
}
// Take field
pub fn take_language_code(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.language_code, ::std::string::String::new())
}
// string country_code = 2;
pub fn get_country_code(&self) -> &str {
&self.country_code
}
pub fn clear_country_code(&mut self) {
self.country_code.clear();
}
// Param is passed by value, moved
pub fn set_country_code(&mut self, v: ::std::string::String) {
self.country_code = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_country_code(&mut self) -> &mut ::std::string::String {
&mut self.country_code
}
// Take field
pub fn take_country_code(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.country_code, ::std::string::String::new())
}
}
impl ::protobuf::Message for LocaleSettings {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.language_code)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.country_code)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.language_code.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.language_code);
}
if !self.country_code.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.country_code);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.language_code.is_empty() {
os.write_string(1, &self.language_code)?;
}
if !self.country_code.is_empty() {
os.write_string(2, &self.country_code)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LocaleSettings {
LocaleSettings::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"language_code",
|m: &LocaleSettings| { &m.language_code },
|m: &mut LocaleSettings| { &mut m.language_code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"country_code",
|m: &LocaleSettings| { &m.country_code },
|m: &mut LocaleSettings| { &mut m.country_code },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<LocaleSettings>(
"LocaleSettings",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static LocaleSettings {
static instance: ::protobuf::rt::LazyV2<LocaleSettings> = ::protobuf::rt::LazyV2::INIT;
instance.get(LocaleSettings::new)
}
}
impl ::protobuf::Clear for LocaleSettings {
fn clear(&mut self) {
self.language_code.clear();
self.country_code.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LocaleSettings {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for LocaleSettings {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x12user_setting.proto\"n\n\x0fUserPreferences\x12\x17\n\x07user_id\
\x18\x01\x20\x01(\tR\x06userId\x12B\n\x12appearance_setting\x18\x02\x20\
\x01(\x0b2\x13.AppearanceSettingsR\x11appearanceSetting\"}\n\x12Appearan\
ceSettings\x12\x14\n\x05theme\x18\x01\x20\x01(\tR\x05theme\x12'\n\x06loc\
ale\x18\x02\x20\x01(\x0b2\x0f.LocaleSettingsR\x06locale\x12(\n\x10reset_\
as_default\x18\x03\x20\x01(\x08R\x0eresetAsDefault\"X\n\x0eLocaleSetting\
s\x12#\n\rlanguage_code\x18\x01\x20\x01(\tR\x0clanguageCode\x12!\n\x0cco\
untry_code\x18\x02\x20\x01(\tR\x0bcountryCodeb\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,4 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod model;
pub use model::*;

View File

@ -1,286 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `errors.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct WSError {
// message fields
pub code: ErrorCode,
pub msg: ::std::string::String,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a WSError {
fn default() -> &'a WSError {
<WSError as ::protobuf::Message>::default_instance()
}
}
impl WSError {
pub fn new() -> WSError {
::std::default::Default::default()
}
// .ErrorCode code = 1;
pub fn get_code(&self) -> ErrorCode {
self.code
}
pub fn clear_code(&mut self) {
self.code = ErrorCode::InternalError;
}
// Param is passed by value, moved
pub fn set_code(&mut self, v: ErrorCode) {
self.code = v;
}
// string msg = 2;
pub fn get_msg(&self) -> &str {
&self.msg
}
pub fn clear_msg(&mut self) {
self.msg.clear();
}
// Param is passed by value, moved
pub fn set_msg(&mut self, v: ::std::string::String) {
self.msg = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_msg(&mut self) -> &mut ::std::string::String {
&mut self.msg
}
// Take field
pub fn take_msg(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.msg, ::std::string::String::new())
}
}
impl ::protobuf::Message for WSError {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.msg)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.code != ErrorCode::InternalError {
my_size += ::protobuf::rt::enum_size(1, self.code);
}
if !self.msg.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.msg);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.code != ErrorCode::InternalError {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.code))?;
}
if !self.msg.is_empty() {
os.write_string(2, &self.msg)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> WSError {
WSError::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ErrorCode>>(
"code",
|m: &WSError| { &m.code },
|m: &mut WSError| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"msg",
|m: &WSError| { &m.msg },
|m: &mut WSError| { &mut m.msg },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<WSError>(
"WSError",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static WSError {
static instance: ::protobuf::rt::LazyV2<WSError> = ::protobuf::rt::LazyV2::INIT;
instance.get(WSError::new)
}
}
impl ::protobuf::Clear for WSError {
fn clear(&mut self) {
self.code = ErrorCode::InternalError;
self.msg.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for WSError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WSError {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ErrorCode {
InternalError = 0,
UnsupportedMessage = 1,
Unauthorized = 2,
}
impl ::protobuf::ProtobufEnum for ErrorCode {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ErrorCode> {
match value {
0 => ::std::option::Option::Some(ErrorCode::InternalError),
1 => ::std::option::Option::Some(ErrorCode::UnsupportedMessage),
2 => ::std::option::Option::Some(ErrorCode::Unauthorized),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ErrorCode] = &[
ErrorCode::InternalError,
ErrorCode::UnsupportedMessage,
ErrorCode::Unauthorized,
];
values
}
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::<ErrorCode>("ErrorCode", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for ErrorCode {
}
impl ::std::default::Default for ErrorCode {
fn default() -> Self {
ErrorCode::InternalError
}
}
impl ::protobuf::reflect::ProtobufValue for ErrorCode {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0cerrors.proto\";\n\x07WSError\x12\x1e\n\x04code\x18\x01\x20\x01(\
\x0e2\n.ErrorCodeR\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03msg*H\
\n\tErrorCode\x12\x11\n\rInternalError\x10\0\x12\x16\n\x12UnsupportedMes\
sage\x10\x01\x12\x10\n\x0cUnauthorized\x10\x02b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}

View File

@ -1,8 +0,0 @@
#![cfg_attr(rustfmt, rustfmt::skip)]
// Auto-generated, do not edit
mod errors;
pub use errors::*;
mod msg;
pub use msg::*;

View File

@ -1,286 +0,0 @@
// This file is generated by rust-protobuf 2.25.2. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `msg.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
#[derive(PartialEq,Clone,Default)]
pub struct WebSocketRawMessage {
// message fields
pub channel: WSChannel,
pub data: ::std::vec::Vec<u8>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a WebSocketRawMessage {
fn default() -> &'a WebSocketRawMessage {
<WebSocketRawMessage as ::protobuf::Message>::default_instance()
}
}
impl WebSocketRawMessage {
pub fn new() -> WebSocketRawMessage {
::std::default::Default::default()
}
// .WSChannel channel = 1;
pub fn get_channel(&self) -> WSChannel {
self.channel
}
pub fn clear_channel(&mut self) {
self.channel = WSChannel::Document;
}
// Param is passed by value, moved
pub fn set_channel(&mut self, v: WSChannel) {
self.channel = v;
}
// bytes data = 2;
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_data(&mut self) {
self.data.clear();
}
// Param is passed by value, moved
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
// Take field
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for WebSocketRawMessage {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.channel, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.channel != WSChannel::Document {
my_size += ::protobuf::rt::enum_size(1, self.channel);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.data);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.channel != WSChannel::Document {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.channel))?;
}
if !self.data.is_empty() {
os.write_bytes(2, &self.data)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> WebSocketRawMessage {
WebSocketRawMessage::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<WSChannel>>(
"channel",
|m: &WebSocketRawMessage| { &m.channel },
|m: &mut WebSocketRawMessage| { &mut m.channel },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &WebSocketRawMessage| { &m.data },
|m: &mut WebSocketRawMessage| { &mut m.data },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<WebSocketRawMessage>(
"WebSocketRawMessage",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static WebSocketRawMessage {
static instance: ::protobuf::rt::LazyV2<WebSocketRawMessage> = ::protobuf::rt::LazyV2::INIT;
instance.get(WebSocketRawMessage::new)
}
}
impl ::protobuf::Clear for WebSocketRawMessage {
fn clear(&mut self) {
self.channel = WSChannel::Document;
self.data.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for WebSocketRawMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WebSocketRawMessage {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum WSChannel {
Document = 0,
Folder = 1,
Grid = 2,
}
impl ::protobuf::ProtobufEnum for WSChannel {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<WSChannel> {
match value {
0 => ::std::option::Option::Some(WSChannel::Document),
1 => ::std::option::Option::Some(WSChannel::Folder),
2 => ::std::option::Option::Some(WSChannel::Grid),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [WSChannel] = &[
WSChannel::Document,
WSChannel::Folder,
WSChannel::Grid,
];
values
}
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::<WSChannel>("WSChannel", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for WSChannel {
}
impl ::std::default::Default for WSChannel {
fn default() -> Self {
WSChannel::Document
}
}
impl ::protobuf::reflect::ProtobufValue for WSChannel {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\tmsg.proto\"O\n\x13WebSocketRawMessage\x12$\n\x07channel\x18\x01\x20\
\x01(\x0e2\n.WSChannelR\x07channel\x12\x12\n\x04data\x18\x02\x20\x01(\
\x0cR\x04data*/\n\tWSChannel\x12\x0c\n\x08Document\x10\0\x12\n\n\x06Fold\
er\x10\x01\x12\x08\n\x04Grid\x10\x02b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}