From 5100c33fef75a92510c30c8a025a1ea43277dcdc Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Tue, 18 Jun 2019 18:17:34 +1200 Subject: [PATCH] Update protobuf-build Fixes a bunch of warnings Signed-off-by: Nick Cameron --- Cargo.toml | 2 +- src/prost.rs | 84 +- src/prost/coprocessor.rs | 24 +- src/prost/deadlockpb.rs | 149 +- src/prost/debugpb.rs | 871 +- src/prost/enginepb.rs | 175 +- src/prost/errorpb.rs | 49 +- src/prost/import_kvpb.rs | 478 +- src/prost/import_sstpb.rs | 279 +- src/prost/kvrpcpb.rs | 466 +- src/prost/metapb.rs | 38 +- src/prost/pdpb.rs | 1721 +++- src/prost/raft_cmdpb.rs | 267 +- src/prost/raft_serverpb.rs | 75 +- src/prost/rustproto.rs | 1 + src/prost/tikvpb.rs | 2137 +++- src/prost/wrapper_coprocessor.rs | 671 +- src/prost/wrapper_deadlockpb.rs | 700 +- src/prost/wrapper_debugpb.rs | 4152 +++++--- src/prost/wrapper_enginepb.rs | 1585 ++- src/prost/wrapper_errorpb.rs | 1528 ++- src/prost/wrapper_import_kvpb.rs | 2420 +++-- src/prost/wrapper_import_sstpb.rs | 1404 ++- src/prost/wrapper_kvrpcpb.rs | 14171 +++++++++++++++++++-------- src/prost/wrapper_metapb.rs | 959 +- src/prost/wrapper_pdpb.rs | 10963 +++++++++++++++------ src/prost/wrapper_raft_cmdpb.rs | 8494 +++++++++++----- src/prost/wrapper_raft_serverpb.rs | 2309 +++-- src/prost/wrapper_rustproto.rs | 1 - src/prost/wrapper_tikvpb.rs | 600 +- 30 files changed, 40652 insertions(+), 16121 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9348c5dcc..d8d3f7873 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,4 +23,4 @@ raft-proto = "0.4" lazy_static = "1.3" [build-dependencies] -protobuf-build = "0.5.0" +protobuf-build = "0.6" diff --git a/src/prost.rs b/src/prost.rs index 5be47b5ac..59987c4d6 100644 --- a/src/prost.rs +++ b/src/prost.rs @@ -2,31 +2,59 @@ pub use raft_proto::eraftpb; -pub mod coprocessor{ -include!("prost/coprocessor.rs");include!("prost/wrapper_coprocessor.rs");} -pub mod deadlockpb{ -include!("prost/deadlockpb.rs");include!("prost/wrapper_deadlockpb.rs");} -pub mod debugpb{ -include!("prost/debugpb.rs");include!("prost/wrapper_debugpb.rs");} -pub mod enginepb{ -include!("prost/enginepb.rs");include!("prost/wrapper_enginepb.rs");} -pub mod errorpb{ -include!("prost/errorpb.rs");include!("prost/wrapper_errorpb.rs");} -pub mod import_kvpb{ -include!("prost/import_kvpb.rs");include!("prost/wrapper_import_kvpb.rs");} -pub mod import_sstpb{ -include!("prost/import_sstpb.rs");include!("prost/wrapper_import_sstpb.rs");} -pub mod kvrpcpb{ -include!("prost/kvrpcpb.rs");include!("prost/wrapper_kvrpcpb.rs");} -pub mod metapb{ -include!("prost/metapb.rs");include!("prost/wrapper_metapb.rs");} -pub mod pdpb{ -include!("prost/pdpb.rs");include!("prost/wrapper_pdpb.rs");} -pub mod raft_cmdpb{ -include!("prost/raft_cmdpb.rs");include!("prost/wrapper_raft_cmdpb.rs");} -pub mod raft_serverpb{ -include!("prost/raft_serverpb.rs");include!("prost/wrapper_raft_serverpb.rs");} -pub mod rustproto{ -include!("prost/rustproto.rs");include!("prost/wrapper_rustproto.rs");} -pub mod tikvpb{ -include!("prost/tikvpb.rs");include!("prost/wrapper_tikvpb.rs");} +pub mod coprocessor { + include!("prost/coprocessor.rs"); + include!("prost/wrapper_coprocessor.rs"); +} +pub mod deadlockpb { + include!("prost/deadlockpb.rs"); + include!("prost/wrapper_deadlockpb.rs"); +} +pub mod debugpb { + include!("prost/debugpb.rs"); + include!("prost/wrapper_debugpb.rs"); +} +pub mod enginepb { + include!("prost/enginepb.rs"); + include!("prost/wrapper_enginepb.rs"); +} +pub mod errorpb { + include!("prost/errorpb.rs"); + include!("prost/wrapper_errorpb.rs"); +} +pub mod import_kvpb { + include!("prost/import_kvpb.rs"); + include!("prost/wrapper_import_kvpb.rs"); +} +pub mod import_sstpb { + include!("prost/import_sstpb.rs"); + include!("prost/wrapper_import_sstpb.rs"); +} +pub mod kvrpcpb { + include!("prost/kvrpcpb.rs"); + include!("prost/wrapper_kvrpcpb.rs"); +} +pub mod metapb { + include!("prost/metapb.rs"); + include!("prost/wrapper_metapb.rs"); +} +pub mod pdpb { + include!("prost/pdpb.rs"); + include!("prost/wrapper_pdpb.rs"); +} +pub mod raft_cmdpb { + include!("prost/raft_cmdpb.rs"); + include!("prost/wrapper_raft_cmdpb.rs"); +} +pub mod raft_serverpb { + include!("prost/raft_serverpb.rs"); + include!("prost/wrapper_raft_serverpb.rs"); +} +pub mod rustproto { + include!("prost/rustproto.rs"); + include!("prost/wrapper_rustproto.rs"); +} +pub mod tikvpb { + include!("prost/tikvpb.rs"); + include!("prost/wrapper_tikvpb.rs"); +} diff --git a/src/prost/coprocessor.rs b/src/prost/coprocessor.rs index e24729bda..a95ff7a9f 100644 --- a/src/prost/coprocessor.rs +++ b/src/prost/coprocessor.rs @@ -1,34 +1,34 @@ /// [start, end) #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyRange { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub start: std::vec::Vec, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub end: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(int64, tag="2")] + #[prost(int64, tag = "2")] pub tp: i64, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub data: std::vec::Vec, - #[prost(message, repeated, tag="4")] + #[prost(message, repeated, tag = "4")] pub ranges: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub data: std::vec::Vec, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub locked: ::std::option::Option, - #[prost(string, tag="4")] + #[prost(string, tag = "4")] pub other_error: std::string::String, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub range: ::std::option::Option, - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub exec_details: ::std::option::Option, } diff --git a/src/prost/deadlockpb.rs b/src/prost/deadlockpb.rs index b47d00a83..d9a3bc4af 100644 --- a/src/prost/deadlockpb.rs +++ b/src/prost/deadlockpb.rs @@ -1,37 +1,36 @@ #[derive(Clone, PartialEq, ::prost::Message)] -pub struct WaitForEntriesRequest { -} +pub struct WaitForEntriesRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct WaitForEntriesResponse { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub entries: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct WaitForEntry { /// The transaction id that is waiting. - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub txn: u64, /// The transaction id that is being waited for. - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub wait_for_txn: u64, /// The hash value of the key is being waited for. - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub key_hash: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeadlockRequest { - #[prost(enumeration="DeadlockRequestType", tag="1")] + #[prost(enumeration = "DeadlockRequestType", tag = "1")] pub tp: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub entry: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeadlockResponse { /// The same entry sent by DeadlockRequest, identifies the sender. - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub entry: ::std::option::Option, /// The key hash of the lock that is hold by the waiting transaction. - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub deadlock_key_hash: u64, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -43,29 +42,121 @@ pub enum DeadlockRequestType { /// CleanUp cleans all entries the transaction is waiting. CleanUp = 2, } -const METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/deadlockpb.Deadlock/GetWaitForEntries", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEADLOCK_DETECT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Duplex, name: "/deadlockpb.Deadlock/Detect", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; +const METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES: ::grpcio::Method< + WaitForEntriesRequest, + WaitForEntriesResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/deadlockpb.Deadlock/GetWaitForEntries", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEADLOCK_DETECT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/deadlockpb.Deadlock/Detect", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; #[derive(Clone)] -pub struct DeadlockClient { client: ::grpcio::Client } +pub struct DeadlockClient { + client: ::grpcio::Client, +} impl DeadlockClient { -pub fn new(channel: ::grpcio::Channel) -> Self { DeadlockClient { client: ::grpcio::Client::new(channel) }} -pub fn get_wait_for_entries_opt(&self, req: &WaitForEntriesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES, req, opt) } -pub fn get_wait_for_entries(&self, req: &WaitForEntriesRequest) -> ::grpcio::Result { self.get_wait_for_entries_opt(req, ::grpcio::CallOption::default()) } -pub fn get_wait_for_entries_async_opt(&self, req: &WaitForEntriesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES, req, opt) } -pub fn get_wait_for_entries_async(&self, req: &WaitForEntriesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_wait_for_entries_async_opt(req, ::grpcio::CallOption::default()) } -pub fn detect_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.client.duplex_streaming(&METHOD_DEADLOCK_DETECT, opt) } -pub fn detect(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.detect_opt(::grpcio::CallOption::default()) } -pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static {self.client.spawn(f)} + pub fn new(channel: ::grpcio::Channel) -> Self { + DeadlockClient { + client: ::grpcio::Client::new(channel), + } + } + pub fn get_wait_for_entries_opt( + &self, + req: &WaitForEntriesRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES, req, opt) + } + pub fn get_wait_for_entries( + &self, + req: &WaitForEntriesRequest, + ) -> ::grpcio::Result { + self.get_wait_for_entries_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_wait_for_entries_async_opt( + &self, + req: &WaitForEntriesRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES, req, opt) + } + pub fn get_wait_for_entries_async( + &self, + req: &WaitForEntriesRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_wait_for_entries_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn detect_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.client.duplex_streaming(&METHOD_DEADLOCK_DETECT, opt) + } + pub fn detect( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.detect_opt(::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) + where + F: ::futures::Future + Send + 'static, + { + self.client.spawn(f) + } } pub trait Deadlock { -fn get_wait_for_entries(&mut self, ctx: ::grpcio::RpcContext, req: WaitForEntriesRequest, sink: ::grpcio::UnarySink); -fn detect(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); + fn get_wait_for_entries( + &mut self, + ctx: ::grpcio::RpcContext, + req: WaitForEntriesRequest, + sink: ::grpcio::UnarySink, + ); + fn detect( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::DuplexSink, + ); } pub fn create_deadlock(s: S) -> ::grpcio::Service { -let mut builder = ::grpcio::ServiceBuilder::new(); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES, move |ctx, req, resp| instance.get_wait_for_entries(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_duplex_streaming_handler(&METHOD_DEADLOCK_DETECT, move |ctx, req, resp| instance.detect(ctx, req, resp)); -builder.build() + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_unary_handler( + &METHOD_DEADLOCK_GET_WAIT_FOR_ENTRIES, + move |ctx, req, resp| instance.get_wait_for_entries(ctx, req, resp), + ); + let mut instance = s.clone(); + builder = builder + .add_duplex_streaming_handler(&METHOD_DEADLOCK_DETECT, move |ctx, req, resp| { + instance.detect(ctx, req, resp) + }); + builder.build() } diff --git a/src/prost/debugpb.rs b/src/prost/debugpb.rs index 4a997b5c2..4bf42f8ab 100644 --- a/src/prost/debugpb.rs +++ b/src/prost/debugpb.rs @@ -1,186 +1,180 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRequest { - #[prost(enumeration="Db", tag="1")] + #[prost(enumeration = "Db", tag = "1")] pub db: i32, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub cf: std::string::String, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResponse { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftLogRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub log_index: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftLogResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub entry: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionInfoRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionInfoResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub raft_local_state: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub raft_apply_state: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub region_local_state: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionSizeRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(string, repeated, tag="2")] + #[prost(string, repeated, tag = "2")] pub cfs: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionSizeResponse { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub entries: ::std::vec::Vec, } pub mod region_size_response { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub cf: std::string::String, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub size: u64, } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanMvccRequest { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub from_key: std::vec::Vec, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub to_key: std::vec::Vec, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub limit: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanMvccResponse { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub key: std::vec::Vec, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub info: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompactRequest { - #[prost(enumeration="Db", tag="1")] + #[prost(enumeration = "Db", tag = "1")] pub db: i32, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub cf: std::string::String, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub from_key: std::vec::Vec, - #[prost(bytes, tag="4")] + #[prost(bytes, tag = "4")] pub to_key: std::vec::Vec, - #[prost(uint32, tag="5")] + #[prost(uint32, tag = "5")] pub threads: u32, - #[prost(enumeration="BottommostLevelCompaction", tag="6")] + #[prost(enumeration = "BottommostLevelCompaction", tag = "6")] pub bottommost_level_compaction: i32, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompactResponse { -} +pub struct CompactResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct InjectFailPointRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub name: std::string::String, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub actions: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct InjectFailPointResponse { -} +pub struct InjectFailPointResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecoverFailPointRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub name: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RecoverFailPointResponse { -} +pub struct RecoverFailPointResponse {} #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListFailPointsRequest { -} +pub struct ListFailPointsRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListFailPointsResponse { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub entries: ::std::vec::Vec, } pub mod list_fail_points_response { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub name: std::string::String, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub actions: std::string::String, } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMetricsRequest { - #[prost(bool, tag="1")] + #[prost(bool, tag = "1")] pub all: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMetricsResponse { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub prometheus: std::string::String, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub rocksdb_kv: std::string::String, - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub rocksdb_raft: std::string::String, - #[prost(string, tag="4")] + #[prost(string, tag = "4")] pub jemalloc: std::string::String, - #[prost(uint64, tag="5")] + #[prost(uint64, tag = "5")] pub store_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionConsistencyCheckRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RegionConsistencyCheckResponse { -} +pub struct RegionConsistencyCheckResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModifyTikvConfigRequest { - #[prost(enumeration="Module", tag="1")] + #[prost(enumeration = "Module", tag = "1")] pub module: i32, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub config_name: std::string::String, - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub config_value: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModifyTikvConfigResponse { -} +pub struct ModifyTikvConfigResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct Property { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub name: std::string::String, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub value: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionPropertiesRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionPropertiesResponse { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub props: ::std::vec::Vec, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -215,117 +209,662 @@ pub enum BottommostLevelCompaction { /// Compact bottommost level if there is a compaction filter. IfHaveCompactionFilter = 2, } -const METHOD_DEBUG_GET: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/Get", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_RAFT_LOG: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/RaftLog", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_REGION_INFO: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/RegionInfo", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_REGION_SIZE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/RegionSize", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_SCAN_MVCC: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ServerStreaming, name: "/debugpb.Debug/ScanMvcc", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_COMPACT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/Compact", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_INJECT_FAIL_POINT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/InjectFailPoint", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_RECOVER_FAIL_POINT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/RecoverFailPoint", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_LIST_FAIL_POINTS: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/ListFailPoints", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_GET_METRICS: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/GetMetrics", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_CHECK_REGION_CONSISTENCY: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/CheckRegionConsistency", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_MODIFY_TIKV_CONFIG: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/ModifyTikvConfig", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_DEBUG_GET_REGION_PROPERTIES: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/debugpb.Debug/GetRegionProperties", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; +const METHOD_DEBUG_GET: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/Get", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_RAFT_LOG: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/RaftLog", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_REGION_INFO: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/RegionInfo", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_DEBUG_REGION_SIZE: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/RegionSize", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_DEBUG_SCAN_MVCC: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::ServerStreaming, + name: "/debugpb.Debug/ScanMvcc", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_DEBUG_COMPACT: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/Compact", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_INJECT_FAIL_POINT: ::grpcio::Method< + InjectFailPointRequest, + InjectFailPointResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/InjectFailPoint", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_RECOVER_FAIL_POINT: ::grpcio::Method< + RecoverFailPointRequest, + RecoverFailPointResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/RecoverFailPoint", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_LIST_FAIL_POINTS: ::grpcio::Method< + ListFailPointsRequest, + ListFailPointsResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/ListFailPoints", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_GET_METRICS: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/GetMetrics", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_DEBUG_CHECK_REGION_CONSISTENCY: ::grpcio::Method< + RegionConsistencyCheckRequest, + RegionConsistencyCheckResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/CheckRegionConsistency", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_MODIFY_TIKV_CONFIG: ::grpcio::Method< + ModifyTikvConfigRequest, + ModifyTikvConfigResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/ModifyTikvConfig", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_DEBUG_GET_REGION_PROPERTIES: ::grpcio::Method< + GetRegionPropertiesRequest, + GetRegionPropertiesResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/debugpb.Debug/GetRegionProperties", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; #[derive(Clone)] -pub struct DebugClient { client: ::grpcio::Client } +pub struct DebugClient { + client: ::grpcio::Client, +} impl DebugClient { -pub fn new(channel: ::grpcio::Channel) -> Self { DebugClient { client: ::grpcio::Client::new(channel) }} -pub fn get_opt(&self, req: &GetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_GET, req, opt) } -pub fn get(&self, req: &GetRequest) -> ::grpcio::Result { self.get_opt(req, ::grpcio::CallOption::default()) } -pub fn get_async_opt(&self, req: &GetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_GET, req, opt) } -pub fn get_async(&self, req: &GetRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raft_log_opt(&self, req: &RaftLogRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_RAFT_LOG, req, opt) } -pub fn raft_log(&self, req: &RaftLogRequest) -> ::grpcio::Result { self.raft_log_opt(req, ::grpcio::CallOption::default()) } -pub fn raft_log_async_opt(&self, req: &RaftLogRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_RAFT_LOG, req, opt) } -pub fn raft_log_async(&self, req: &RaftLogRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raft_log_async_opt(req, ::grpcio::CallOption::default()) } -pub fn region_info_opt(&self, req: &RegionInfoRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_REGION_INFO, req, opt) } -pub fn region_info(&self, req: &RegionInfoRequest) -> ::grpcio::Result { self.region_info_opt(req, ::grpcio::CallOption::default()) } -pub fn region_info_async_opt(&self, req: &RegionInfoRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_REGION_INFO, req, opt) } -pub fn region_info_async(&self, req: &RegionInfoRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.region_info_async_opt(req, ::grpcio::CallOption::default()) } -pub fn region_size_opt(&self, req: &RegionSizeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_REGION_SIZE, req, opt) } -pub fn region_size(&self, req: &RegionSizeRequest) -> ::grpcio::Result { self.region_size_opt(req, ::grpcio::CallOption::default()) } -pub fn region_size_async_opt(&self, req: &RegionSizeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_REGION_SIZE, req, opt) } -pub fn region_size_async(&self, req: &RegionSizeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.region_size_async_opt(req, ::grpcio::CallOption::default()) } -pub fn scan_mvcc_opt(&self, req: &ScanMvccRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver,> { self.client.server_streaming(&METHOD_DEBUG_SCAN_MVCC, req, opt) } -pub fn scan_mvcc(&self, req: &ScanMvccRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver,> { self.scan_mvcc_opt(req, ::grpcio::CallOption::default()) } -pub fn compact_opt(&self, req: &CompactRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_COMPACT, req, opt) } -pub fn compact(&self, req: &CompactRequest) -> ::grpcio::Result { self.compact_opt(req, ::grpcio::CallOption::default()) } -pub fn compact_async_opt(&self, req: &CompactRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_COMPACT, req, opt) } -pub fn compact_async(&self, req: &CompactRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.compact_async_opt(req, ::grpcio::CallOption::default()) } -pub fn inject_fail_point_opt(&self, req: &InjectFailPointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_INJECT_FAIL_POINT, req, opt) } -pub fn inject_fail_point(&self, req: &InjectFailPointRequest) -> ::grpcio::Result { self.inject_fail_point_opt(req, ::grpcio::CallOption::default()) } -pub fn inject_fail_point_async_opt(&self, req: &InjectFailPointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_INJECT_FAIL_POINT, req, opt) } -pub fn inject_fail_point_async(&self, req: &InjectFailPointRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.inject_fail_point_async_opt(req, ::grpcio::CallOption::default()) } -pub fn recover_fail_point_opt(&self, req: &RecoverFailPointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_RECOVER_FAIL_POINT, req, opt) } -pub fn recover_fail_point(&self, req: &RecoverFailPointRequest) -> ::grpcio::Result { self.recover_fail_point_opt(req, ::grpcio::CallOption::default()) } -pub fn recover_fail_point_async_opt(&self, req: &RecoverFailPointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_RECOVER_FAIL_POINT, req, opt) } -pub fn recover_fail_point_async(&self, req: &RecoverFailPointRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.recover_fail_point_async_opt(req, ::grpcio::CallOption::default()) } -pub fn list_fail_points_opt(&self, req: &ListFailPointsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_LIST_FAIL_POINTS, req, opt) } -pub fn list_fail_points(&self, req: &ListFailPointsRequest) -> ::grpcio::Result { self.list_fail_points_opt(req, ::grpcio::CallOption::default()) } -pub fn list_fail_points_async_opt(&self, req: &ListFailPointsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_LIST_FAIL_POINTS, req, opt) } -pub fn list_fail_points_async(&self, req: &ListFailPointsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.list_fail_points_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_metrics_opt(&self, req: &GetMetricsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_GET_METRICS, req, opt) } -pub fn get_metrics(&self, req: &GetMetricsRequest) -> ::grpcio::Result { self.get_metrics_opt(req, ::grpcio::CallOption::default()) } -pub fn get_metrics_async_opt(&self, req: &GetMetricsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_GET_METRICS, req, opt) } -pub fn get_metrics_async(&self, req: &GetMetricsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_metrics_async_opt(req, ::grpcio::CallOption::default()) } -pub fn check_region_consistency_opt(&self, req: &RegionConsistencyCheckRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_CHECK_REGION_CONSISTENCY, req, opt) } -pub fn check_region_consistency(&self, req: &RegionConsistencyCheckRequest) -> ::grpcio::Result { self.check_region_consistency_opt(req, ::grpcio::CallOption::default()) } -pub fn check_region_consistency_async_opt(&self, req: &RegionConsistencyCheckRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_CHECK_REGION_CONSISTENCY, req, opt) } -pub fn check_region_consistency_async(&self, req: &RegionConsistencyCheckRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.check_region_consistency_async_opt(req, ::grpcio::CallOption::default()) } -pub fn modify_tikv_config_opt(&self, req: &ModifyTikvConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_MODIFY_TIKV_CONFIG, req, opt) } -pub fn modify_tikv_config(&self, req: &ModifyTikvConfigRequest) -> ::grpcio::Result { self.modify_tikv_config_opt(req, ::grpcio::CallOption::default()) } -pub fn modify_tikv_config_async_opt(&self, req: &ModifyTikvConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_MODIFY_TIKV_CONFIG, req, opt) } -pub fn modify_tikv_config_async(&self, req: &ModifyTikvConfigRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.modify_tikv_config_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_region_properties_opt(&self, req: &GetRegionPropertiesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_DEBUG_GET_REGION_PROPERTIES, req, opt) } -pub fn get_region_properties(&self, req: &GetRegionPropertiesRequest) -> ::grpcio::Result { self.get_region_properties_opt(req, ::grpcio::CallOption::default()) } -pub fn get_region_properties_async_opt(&self, req: &GetRegionPropertiesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_DEBUG_GET_REGION_PROPERTIES, req, opt) } -pub fn get_region_properties_async(&self, req: &GetRegionPropertiesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_region_properties_async_opt(req, ::grpcio::CallOption::default()) } -pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static {self.client.spawn(f)} + pub fn new(channel: ::grpcio::Channel) -> Self { + DebugClient { + client: ::grpcio::Client::new(channel), + } + } + pub fn get_opt( + &self, + req: &GetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_DEBUG_GET, req, opt) + } + pub fn get(&self, req: &GetRequest) -> ::grpcio::Result { + self.get_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_async_opt( + &self, + req: &GetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_DEBUG_GET, req, opt) + } + pub fn get_async( + &self, + req: &GetRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raft_log_opt( + &self, + req: &RaftLogRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_DEBUG_RAFT_LOG, req, opt) + } + pub fn raft_log(&self, req: &RaftLogRequest) -> ::grpcio::Result { + self.raft_log_opt(req, ::grpcio::CallOption::default()) + } + pub fn raft_log_async_opt( + &self, + req: &RaftLogRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_RAFT_LOG, req, opt) + } + pub fn raft_log_async( + &self, + req: &RaftLogRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raft_log_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn region_info_opt( + &self, + req: &RegionInfoRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_DEBUG_REGION_INFO, req, opt) + } + pub fn region_info(&self, req: &RegionInfoRequest) -> ::grpcio::Result { + self.region_info_opt(req, ::grpcio::CallOption::default()) + } + pub fn region_info_async_opt( + &self, + req: &RegionInfoRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_REGION_INFO, req, opt) + } + pub fn region_info_async( + &self, + req: &RegionInfoRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.region_info_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn region_size_opt( + &self, + req: &RegionSizeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_DEBUG_REGION_SIZE, req, opt) + } + pub fn region_size(&self, req: &RegionSizeRequest) -> ::grpcio::Result { + self.region_size_opt(req, ::grpcio::CallOption::default()) + } + pub fn region_size_async_opt( + &self, + req: &RegionSizeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_REGION_SIZE, req, opt) + } + pub fn region_size_async( + &self, + req: &RegionSizeRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.region_size_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn scan_mvcc_opt( + &self, + req: &ScanMvccRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.client + .server_streaming(&METHOD_DEBUG_SCAN_MVCC, req, opt) + } + pub fn scan_mvcc( + &self, + req: &ScanMvccRequest, + ) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.scan_mvcc_opt(req, ::grpcio::CallOption::default()) + } + pub fn compact_opt( + &self, + req: &CompactRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_DEBUG_COMPACT, req, opt) + } + pub fn compact(&self, req: &CompactRequest) -> ::grpcio::Result { + self.compact_opt(req, ::grpcio::CallOption::default()) + } + pub fn compact_async_opt( + &self, + req: &CompactRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_COMPACT, req, opt) + } + pub fn compact_async( + &self, + req: &CompactRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.compact_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn inject_fail_point_opt( + &self, + req: &InjectFailPointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_DEBUG_INJECT_FAIL_POINT, req, opt) + } + pub fn inject_fail_point( + &self, + req: &InjectFailPointRequest, + ) -> ::grpcio::Result { + self.inject_fail_point_opt(req, ::grpcio::CallOption::default()) + } + pub fn inject_fail_point_async_opt( + &self, + req: &InjectFailPointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_INJECT_FAIL_POINT, req, opt) + } + pub fn inject_fail_point_async( + &self, + req: &InjectFailPointRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.inject_fail_point_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn recover_fail_point_opt( + &self, + req: &RecoverFailPointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_DEBUG_RECOVER_FAIL_POINT, req, opt) + } + pub fn recover_fail_point( + &self, + req: &RecoverFailPointRequest, + ) -> ::grpcio::Result { + self.recover_fail_point_opt(req, ::grpcio::CallOption::default()) + } + pub fn recover_fail_point_async_opt( + &self, + req: &RecoverFailPointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_RECOVER_FAIL_POINT, req, opt) + } + pub fn recover_fail_point_async( + &self, + req: &RecoverFailPointRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.recover_fail_point_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn list_fail_points_opt( + &self, + req: &ListFailPointsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_DEBUG_LIST_FAIL_POINTS, req, opt) + } + pub fn list_fail_points( + &self, + req: &ListFailPointsRequest, + ) -> ::grpcio::Result { + self.list_fail_points_opt(req, ::grpcio::CallOption::default()) + } + pub fn list_fail_points_async_opt( + &self, + req: &ListFailPointsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_LIST_FAIL_POINTS, req, opt) + } + pub fn list_fail_points_async( + &self, + req: &ListFailPointsRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.list_fail_points_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_metrics_opt( + &self, + req: &GetMetricsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_DEBUG_GET_METRICS, req, opt) + } + pub fn get_metrics(&self, req: &GetMetricsRequest) -> ::grpcio::Result { + self.get_metrics_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_metrics_async_opt( + &self, + req: &GetMetricsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_GET_METRICS, req, opt) + } + pub fn get_metrics_async( + &self, + req: &GetMetricsRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_metrics_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn check_region_consistency_opt( + &self, + req: &RegionConsistencyCheckRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_DEBUG_CHECK_REGION_CONSISTENCY, req, opt) + } + pub fn check_region_consistency( + &self, + req: &RegionConsistencyCheckRequest, + ) -> ::grpcio::Result { + self.check_region_consistency_opt(req, ::grpcio::CallOption::default()) + } + pub fn check_region_consistency_async_opt( + &self, + req: &RegionConsistencyCheckRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_CHECK_REGION_CONSISTENCY, req, opt) + } + pub fn check_region_consistency_async( + &self, + req: &RegionConsistencyCheckRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.check_region_consistency_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn modify_tikv_config_opt( + &self, + req: &ModifyTikvConfigRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_DEBUG_MODIFY_TIKV_CONFIG, req, opt) + } + pub fn modify_tikv_config( + &self, + req: &ModifyTikvConfigRequest, + ) -> ::grpcio::Result { + self.modify_tikv_config_opt(req, ::grpcio::CallOption::default()) + } + pub fn modify_tikv_config_async_opt( + &self, + req: &ModifyTikvConfigRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_MODIFY_TIKV_CONFIG, req, opt) + } + pub fn modify_tikv_config_async( + &self, + req: &ModifyTikvConfigRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.modify_tikv_config_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_region_properties_opt( + &self, + req: &GetRegionPropertiesRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_DEBUG_GET_REGION_PROPERTIES, req, opt) + } + pub fn get_region_properties( + &self, + req: &GetRegionPropertiesRequest, + ) -> ::grpcio::Result { + self.get_region_properties_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_region_properties_async_opt( + &self, + req: &GetRegionPropertiesRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_DEBUG_GET_REGION_PROPERTIES, req, opt) + } + pub fn get_region_properties_async( + &self, + req: &GetRegionPropertiesRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_region_properties_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) + where + F: ::futures::Future + Send + 'static, + { + self.client.spawn(f) + } } pub trait Debug { -fn get(&mut self, ctx: ::grpcio::RpcContext, req: GetRequest, sink: ::grpcio::UnarySink); -fn raft_log(&mut self, ctx: ::grpcio::RpcContext, req: RaftLogRequest, sink: ::grpcio::UnarySink); -fn region_info(&mut self, ctx: ::grpcio::RpcContext, req: RegionInfoRequest, sink: ::grpcio::UnarySink); -fn region_size(&mut self, ctx: ::grpcio::RpcContext, req: RegionSizeRequest, sink: ::grpcio::UnarySink); -fn scan_mvcc(&mut self, ctx: ::grpcio::RpcContext, req: ScanMvccRequest, sink: ::grpcio::ServerStreamingSink); -fn compact(&mut self, ctx: ::grpcio::RpcContext, req: CompactRequest, sink: ::grpcio::UnarySink); -fn inject_fail_point(&mut self, ctx: ::grpcio::RpcContext, req: InjectFailPointRequest, sink: ::grpcio::UnarySink); -fn recover_fail_point(&mut self, ctx: ::grpcio::RpcContext, req: RecoverFailPointRequest, sink: ::grpcio::UnarySink); -fn list_fail_points(&mut self, ctx: ::grpcio::RpcContext, req: ListFailPointsRequest, sink: ::grpcio::UnarySink); -fn get_metrics(&mut self, ctx: ::grpcio::RpcContext, req: GetMetricsRequest, sink: ::grpcio::UnarySink); -fn check_region_consistency(&mut self, ctx: ::grpcio::RpcContext, req: RegionConsistencyCheckRequest, sink: ::grpcio::UnarySink); -fn modify_tikv_config(&mut self, ctx: ::grpcio::RpcContext, req: ModifyTikvConfigRequest, sink: ::grpcio::UnarySink); -fn get_region_properties(&mut self, ctx: ::grpcio::RpcContext, req: GetRegionPropertiesRequest, sink: ::grpcio::UnarySink); + fn get( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetRequest, + sink: ::grpcio::UnarySink, + ); + fn raft_log( + &mut self, + ctx: ::grpcio::RpcContext, + req: RaftLogRequest, + sink: ::grpcio::UnarySink, + ); + fn region_info( + &mut self, + ctx: ::grpcio::RpcContext, + req: RegionInfoRequest, + sink: ::grpcio::UnarySink, + ); + fn region_size( + &mut self, + ctx: ::grpcio::RpcContext, + req: RegionSizeRequest, + sink: ::grpcio::UnarySink, + ); + fn scan_mvcc( + &mut self, + ctx: ::grpcio::RpcContext, + req: ScanMvccRequest, + sink: ::grpcio::ServerStreamingSink, + ); + fn compact( + &mut self, + ctx: ::grpcio::RpcContext, + req: CompactRequest, + sink: ::grpcio::UnarySink, + ); + fn inject_fail_point( + &mut self, + ctx: ::grpcio::RpcContext, + req: InjectFailPointRequest, + sink: ::grpcio::UnarySink, + ); + fn recover_fail_point( + &mut self, + ctx: ::grpcio::RpcContext, + req: RecoverFailPointRequest, + sink: ::grpcio::UnarySink, + ); + fn list_fail_points( + &mut self, + ctx: ::grpcio::RpcContext, + req: ListFailPointsRequest, + sink: ::grpcio::UnarySink, + ); + fn get_metrics( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetMetricsRequest, + sink: ::grpcio::UnarySink, + ); + fn check_region_consistency( + &mut self, + ctx: ::grpcio::RpcContext, + req: RegionConsistencyCheckRequest, + sink: ::grpcio::UnarySink, + ); + fn modify_tikv_config( + &mut self, + ctx: ::grpcio::RpcContext, + req: ModifyTikvConfigRequest, + sink: ::grpcio::UnarySink, + ); + fn get_region_properties( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetRegionPropertiesRequest, + sink: ::grpcio::UnarySink, + ); } pub fn create_debug(s: S) -> ::grpcio::Service { -let mut builder = ::grpcio::ServiceBuilder::new(); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_GET, move |ctx, req, resp| instance.get(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_RAFT_LOG, move |ctx, req, resp| instance.raft_log(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_REGION_INFO, move |ctx, req, resp| instance.region_info(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_REGION_SIZE, move |ctx, req, resp| instance.region_size(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_server_streaming_handler(&METHOD_DEBUG_SCAN_MVCC, move |ctx, req, resp| instance.scan_mvcc(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_COMPACT, move |ctx, req, resp| instance.compact(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_INJECT_FAIL_POINT, move |ctx, req, resp| instance.inject_fail_point(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_RECOVER_FAIL_POINT, move |ctx, req, resp| instance.recover_fail_point(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_LIST_FAIL_POINTS, move |ctx, req, resp| instance.list_fail_points(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_GET_METRICS, move |ctx, req, resp| instance.get_metrics(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_CHECK_REGION_CONSISTENCY, move |ctx, req, resp| instance.check_region_consistency(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_MODIFY_TIKV_CONFIG, move |ctx, req, resp| instance.modify_tikv_config(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_DEBUG_GET_REGION_PROPERTIES, move |ctx, req, resp| instance.get_region_properties(ctx, req, resp)); -builder.build() + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_GET, move |ctx, req, resp| { + instance.get(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_RAFT_LOG, move |ctx, req, resp| { + instance.raft_log(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_REGION_INFO, move |ctx, req, resp| { + instance.region_info(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_REGION_SIZE, move |ctx, req, resp| { + instance.region_size(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_server_streaming_handler(&METHOD_DEBUG_SCAN_MVCC, move |ctx, req, resp| { + instance.scan_mvcc(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_COMPACT, move |ctx, req, resp| { + instance.compact(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_INJECT_FAIL_POINT, move |ctx, req, resp| { + instance.inject_fail_point(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_RECOVER_FAIL_POINT, move |ctx, req, resp| { + instance.recover_fail_point(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_LIST_FAIL_POINTS, move |ctx, req, resp| { + instance.list_fail_points(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_GET_METRICS, move |ctx, req, resp| { + instance.get_metrics(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler( + &METHOD_DEBUG_CHECK_REGION_CONSISTENCY, + move |ctx, req, resp| instance.check_region_consistency(ctx, req, resp), + ); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_DEBUG_MODIFY_TIKV_CONFIG, move |ctx, req, resp| { + instance.modify_tikv_config(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler( + &METHOD_DEBUG_GET_REGION_PROPERTIES, + move |ctx, req, resp| instance.get_region_properties(ctx, req, resp), + ); + builder.build() } diff --git a/src/prost/enginepb.rs b/src/prost/enginepb.rs index b2edf350f..3c76fe09f 100644 --- a/src/prost/enginepb.rs +++ b/src/prost/enginepb.rs @@ -1,86 +1,85 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandRequestHeader { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub index: u64, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub term: u64, /// Flush in-memory data to disk. - #[prost(bool, tag="4")] + #[prost(bool, tag = "4")] pub sync_log: bool, /// Destroy the region. - #[prost(bool, tag="5")] + #[prost(bool, tag = "5")] pub destroy: bool, /// Additional information for the request. - #[prost(bytes, tag="6")] + #[prost(bytes, tag = "6")] pub context: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, // We don't enclose normal requests and administrator request // at same time. - /// kv put / delete - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub requests: ::std::vec::Vec, /// region metadata manipulation command. - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub admin_request: ::std::option::Option, /// region metadata manipulation result. - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub admin_response: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandRequestBatch { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub requests: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandResponseHeader { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, /// Region is destroyed. - #[prost(bool, tag="2")] + #[prost(bool, tag = "2")] pub destroyed: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub apply_state: ::std::option::Option, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub applied_term: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandResponseBatch { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub responses: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotState { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub peer: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub apply_state: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotData { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub cf: std::string::String, - #[prost(uint32, tag="2")] + #[prost(uint32, tag = "2")] pub checksum: u32, - #[prost(message, repeated, tag="3")] + #[prost(message, repeated, tag = "3")] pub data: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotRequest { - #[prost(oneof="snapshot_request::Chunk", tags="1, 2")] + #[prost(oneof = "snapshot_request::Chunk", tags = "1, 2")] pub chunk: ::std::option::Option, } pub mod snapshot_request { @@ -88,37 +87,121 @@ pub mod snapshot_request { pub enum Chunk { /// The first message for snapshots. /// It contains the latest region information after applied snapshot. - #[prost(message, tag="1")] + #[prost(message, tag = "1")] State(super::SnapshotState), /// Following messages are always data. - #[prost(message, tag="2")] + #[prost(message, tag = "2")] Data(super::SnapshotData), } } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotDone { -} -const METHOD_ENGINE_APPLY_COMMAND_BATCH: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Duplex, name: "/enginepb.Engine/ApplyCommandBatch", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_ENGINE_APPLY_SNAPSHOT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ClientStreaming, name: "/enginepb.Engine/ApplySnapshot", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; +pub struct SnapshotDone {} +const METHOD_ENGINE_APPLY_COMMAND_BATCH: ::grpcio::Method< + CommandRequestBatch, + CommandResponseBatch, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/enginepb.Engine/ApplyCommandBatch", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_ENGINE_APPLY_SNAPSHOT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::ClientStreaming, + name: "/enginepb.Engine/ApplySnapshot", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; #[derive(Clone)] -pub struct EngineClient { client: ::grpcio::Client } +pub struct EngineClient { + client: ::grpcio::Client, +} impl EngineClient { -pub fn new(channel: ::grpcio::Channel) -> Self { EngineClient { client: ::grpcio::Client::new(channel) }} -pub fn apply_command_batch_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.client.duplex_streaming(&METHOD_ENGINE_APPLY_COMMAND_BATCH, opt) } -pub fn apply_command_batch(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.apply_command_batch_opt(::grpcio::CallOption::default()) } -pub fn apply_snapshot_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.client.client_streaming(&METHOD_ENGINE_APPLY_SNAPSHOT, opt) } -pub fn apply_snapshot(&self) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.apply_snapshot_opt(::grpcio::CallOption::default()) } -pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static {self.client.spawn(f)} + pub fn new(channel: ::grpcio::Channel) -> Self { + EngineClient { + client: ::grpcio::Client::new(channel), + } + } + pub fn apply_command_batch_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.client + .duplex_streaming(&METHOD_ENGINE_APPLY_COMMAND_BATCH, opt) + } + pub fn apply_command_batch( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.apply_command_batch_opt(::grpcio::CallOption::default()) + } + pub fn apply_snapshot_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.client + .client_streaming(&METHOD_ENGINE_APPLY_SNAPSHOT, opt) + } + pub fn apply_snapshot( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.apply_snapshot_opt(::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) + where + F: ::futures::Future + Send + 'static, + { + self.client.spawn(f) + } } pub trait Engine { -fn apply_command_batch(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); -fn apply_snapshot(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::ClientStreamingSink); + fn apply_command_batch( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::DuplexSink, + ); + fn apply_snapshot( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::ClientStreamingSink, + ); } pub fn create_engine(s: S) -> ::grpcio::Service { -let mut builder = ::grpcio::ServiceBuilder::new(); -let mut instance = s.clone(); -builder = builder.add_duplex_streaming_handler(&METHOD_ENGINE_APPLY_COMMAND_BATCH, move |ctx, req, resp| instance.apply_command_batch(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_client_streaming_handler(&METHOD_ENGINE_APPLY_SNAPSHOT, move |ctx, req, resp| instance.apply_snapshot(ctx, req, resp)); -builder.build() + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder + .add_duplex_streaming_handler(&METHOD_ENGINE_APPLY_COMMAND_BATCH, move |ctx, req, resp| { + instance.apply_command_batch(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_client_streaming_handler(&METHOD_ENGINE_APPLY_SNAPSHOT, move |ctx, req, resp| { + instance.apply_snapshot(ctx, req, resp) + }); + builder.build() } diff --git a/src/prost/errorpb.rs b/src/prost/errorpb.rs index ba10c739b..e6354e9db 100644 --- a/src/prost/errorpb.rs +++ b/src/prost/errorpb.rs @@ -1,73 +1,72 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct NotLeader { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub leader: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreNotMatch { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub request_store_id: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub actual_store_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionNotFound { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyNotInRegion { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub key: std::vec::Vec, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub region_id: u64, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="4")] + #[prost(bytes, tag = "4")] pub end_key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct EpochNotMatch { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub current_regions: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerIsBusy { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub reason: std::string::String, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub backoff_ms: u64, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct StaleCommand { -} +pub struct StaleCommand {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftEntryTooLarge { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub entry_size: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub message: std::string::String, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub not_leader: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub region_not_found: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub key_not_in_region: ::std::option::Option, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub epoch_not_match: ::std::option::Option, - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub server_is_busy: ::std::option::Option, - #[prost(message, optional, tag="7")] + #[prost(message, optional, tag = "7")] pub stale_command: ::std::option::Option, - #[prost(message, optional, tag="8")] + #[prost(message, optional, tag = "8")] pub store_not_match: ::std::option::Option, - #[prost(message, optional, tag="9")] + #[prost(message, optional, tag = "9")] pub raft_entry_too_large: ::std::option::Option, } diff --git a/src/prost/import_kvpb.rs b/src/prost/import_kvpb.rs index 547e27498..7369310c6 100644 --- a/src/prost/import_kvpb.rs +++ b/src/prost/import_kvpb.rs @@ -1,33 +1,31 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct SwitchModeRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub pd_addr: std::string::String, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub request: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SwitchModeResponse { -} +pub struct SwitchModeResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct OpenEngineRequest { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub uuid: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct OpenEngineResponse { -} +pub struct OpenEngineResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteHead { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub uuid: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Mutation { - #[prost(enumeration="mutation::Op", tag="1")] + #[prost(enumeration = "mutation::Op", tag = "1")] pub op: i32, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub value: std::vec::Vec, } pub mod mutation { @@ -39,147 +37,445 @@ pub mod mutation { } #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteBatch { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub commit_ts: u64, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub mutations: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteEngineRequest { - #[prost(oneof="write_engine_request::Chunk", tags="1, 2")] + #[prost(oneof = "write_engine_request::Chunk", tags = "1, 2")] pub chunk: ::std::option::Option, } pub mod write_engine_request { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Chunk { - #[prost(message, tag="1")] + #[prost(message, tag = "1")] Head(super::WriteHead), - #[prost(message, tag="2")] + #[prost(message, tag = "2")] Batch(super::WriteBatch), } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteEngineResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CloseEngineRequest { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub uuid: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CloseEngineResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportEngineRequest { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub uuid: std::vec::Vec, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub pd_addr: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ImportEngineResponse { -} +pub struct ImportEngineResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct CleanupEngineRequest { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub uuid: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CleanupEngineResponse { -} +pub struct CleanupEngineResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompactClusterRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub pd_addr: std::string::String, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub request: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompactClusterResponse { -} +pub struct CompactClusterResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { /// This can happen if the client hasn't opened the engine, or the server /// restarts while the client is writing or closing. An unclosed engine will /// be removed on server restart, so the client should not continue but /// restart the previous job in that case. - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub engine_not_found: ::std::option::Option, } pub mod error { #[derive(Clone, PartialEq, ::prost::Message)] pub struct EngineNotFound { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub uuid: std::vec::Vec, } } -const METHOD_IMPORT_KV_SWITCH_MODE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_kvpb.ImportKV/SwitchMode", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_KV_OPEN_ENGINE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_kvpb.ImportKV/OpenEngine", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_KV_WRITE_ENGINE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ClientStreaming, name: "/import_kvpb.ImportKV/WriteEngine", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_KV_CLOSE_ENGINE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_kvpb.ImportKV/CloseEngine", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_KV_IMPORT_ENGINE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_kvpb.ImportKV/ImportEngine", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_KV_CLEANUP_ENGINE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_kvpb.ImportKV/CleanupEngine", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_KV_COMPACT_CLUSTER: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_kvpb.ImportKV/CompactCluster", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; +const METHOD_IMPORT_KV_SWITCH_MODE: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_kvpb.ImportKV/SwitchMode", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_KV_OPEN_ENGINE: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_kvpb.ImportKV/OpenEngine", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_KV_WRITE_ENGINE: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::ClientStreaming, + name: "/import_kvpb.ImportKV/WriteEngine", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_KV_CLOSE_ENGINE: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_kvpb.ImportKV/CloseEngine", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_KV_IMPORT_ENGINE: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_kvpb.ImportKV/ImportEngine", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_KV_CLEANUP_ENGINE: ::grpcio::Method< + CleanupEngineRequest, + CleanupEngineResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_kvpb.ImportKV/CleanupEngine", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_IMPORT_KV_COMPACT_CLUSTER: ::grpcio::Method< + CompactClusterRequest, + CompactClusterResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_kvpb.ImportKV/CompactCluster", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; #[derive(Clone)] -pub struct ImportKvClient { client: ::grpcio::Client } +pub struct ImportKvClient { + client: ::grpcio::Client, +} impl ImportKvClient { -pub fn new(channel: ::grpcio::Channel) -> Self { ImportKvClient { client: ::grpcio::Client::new(channel) }} -pub fn switch_mode_opt(&self, req: &SwitchModeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_KV_SWITCH_MODE, req, opt) } -pub fn switch_mode(&self, req: &SwitchModeRequest) -> ::grpcio::Result { self.switch_mode_opt(req, ::grpcio::CallOption::default()) } -pub fn switch_mode_async_opt(&self, req: &SwitchModeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_KV_SWITCH_MODE, req, opt) } -pub fn switch_mode_async(&self, req: &SwitchModeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.switch_mode_async_opt(req, ::grpcio::CallOption::default()) } -pub fn open_engine_opt(&self, req: &OpenEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_KV_OPEN_ENGINE, req, opt) } -pub fn open_engine(&self, req: &OpenEngineRequest) -> ::grpcio::Result { self.open_engine_opt(req, ::grpcio::CallOption::default()) } -pub fn open_engine_async_opt(&self, req: &OpenEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_KV_OPEN_ENGINE, req, opt) } -pub fn open_engine_async(&self, req: &OpenEngineRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.open_engine_async_opt(req, ::grpcio::CallOption::default()) } -pub fn write_engine_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.client.client_streaming(&METHOD_IMPORT_KV_WRITE_ENGINE, opt) } -pub fn write_engine(&self) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.write_engine_opt(::grpcio::CallOption::default()) } -pub fn close_engine_opt(&self, req: &CloseEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_KV_CLOSE_ENGINE, req, opt) } -pub fn close_engine(&self, req: &CloseEngineRequest) -> ::grpcio::Result { self.close_engine_opt(req, ::grpcio::CallOption::default()) } -pub fn close_engine_async_opt(&self, req: &CloseEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_KV_CLOSE_ENGINE, req, opt) } -pub fn close_engine_async(&self, req: &CloseEngineRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.close_engine_async_opt(req, ::grpcio::CallOption::default()) } -pub fn import_engine_opt(&self, req: &ImportEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_KV_IMPORT_ENGINE, req, opt) } -pub fn import_engine(&self, req: &ImportEngineRequest) -> ::grpcio::Result { self.import_engine_opt(req, ::grpcio::CallOption::default()) } -pub fn import_engine_async_opt(&self, req: &ImportEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_KV_IMPORT_ENGINE, req, opt) } -pub fn import_engine_async(&self, req: &ImportEngineRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.import_engine_async_opt(req, ::grpcio::CallOption::default()) } -pub fn cleanup_engine_opt(&self, req: &CleanupEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_KV_CLEANUP_ENGINE, req, opt) } -pub fn cleanup_engine(&self, req: &CleanupEngineRequest) -> ::grpcio::Result { self.cleanup_engine_opt(req, ::grpcio::CallOption::default()) } -pub fn cleanup_engine_async_opt(&self, req: &CleanupEngineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_KV_CLEANUP_ENGINE, req, opt) } -pub fn cleanup_engine_async(&self, req: &CleanupEngineRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.cleanup_engine_async_opt(req, ::grpcio::CallOption::default()) } -pub fn compact_cluster_opt(&self, req: &CompactClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_KV_COMPACT_CLUSTER, req, opt) } -pub fn compact_cluster(&self, req: &CompactClusterRequest) -> ::grpcio::Result { self.compact_cluster_opt(req, ::grpcio::CallOption::default()) } -pub fn compact_cluster_async_opt(&self, req: &CompactClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_KV_COMPACT_CLUSTER, req, opt) } -pub fn compact_cluster_async(&self, req: &CompactClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.compact_cluster_async_opt(req, ::grpcio::CallOption::default()) } -pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static {self.client.spawn(f)} + pub fn new(channel: ::grpcio::Channel) -> Self { + ImportKvClient { + client: ::grpcio::Client::new(channel), + } + } + pub fn switch_mode_opt( + &self, + req: &SwitchModeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_IMPORT_KV_SWITCH_MODE, req, opt) + } + pub fn switch_mode(&self, req: &SwitchModeRequest) -> ::grpcio::Result { + self.switch_mode_opt(req, ::grpcio::CallOption::default()) + } + pub fn switch_mode_async_opt( + &self, + req: &SwitchModeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_KV_SWITCH_MODE, req, opt) + } + pub fn switch_mode_async( + &self, + req: &SwitchModeRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.switch_mode_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn open_engine_opt( + &self, + req: &OpenEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_IMPORT_KV_OPEN_ENGINE, req, opt) + } + pub fn open_engine(&self, req: &OpenEngineRequest) -> ::grpcio::Result { + self.open_engine_opt(req, ::grpcio::CallOption::default()) + } + pub fn open_engine_async_opt( + &self, + req: &OpenEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_KV_OPEN_ENGINE, req, opt) + } + pub fn open_engine_async( + &self, + req: &OpenEngineRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.open_engine_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn write_engine_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.client + .client_streaming(&METHOD_IMPORT_KV_WRITE_ENGINE, opt) + } + pub fn write_engine( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.write_engine_opt(::grpcio::CallOption::default()) + } + pub fn close_engine_opt( + &self, + req: &CloseEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_IMPORT_KV_CLOSE_ENGINE, req, opt) + } + pub fn close_engine(&self, req: &CloseEngineRequest) -> ::grpcio::Result { + self.close_engine_opt(req, ::grpcio::CallOption::default()) + } + pub fn close_engine_async_opt( + &self, + req: &CloseEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_KV_CLOSE_ENGINE, req, opt) + } + pub fn close_engine_async( + &self, + req: &CloseEngineRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.close_engine_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn import_engine_opt( + &self, + req: &ImportEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_IMPORT_KV_IMPORT_ENGINE, req, opt) + } + pub fn import_engine( + &self, + req: &ImportEngineRequest, + ) -> ::grpcio::Result { + self.import_engine_opt(req, ::grpcio::CallOption::default()) + } + pub fn import_engine_async_opt( + &self, + req: &ImportEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_KV_IMPORT_ENGINE, req, opt) + } + pub fn import_engine_async( + &self, + req: &ImportEngineRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.import_engine_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn cleanup_engine_opt( + &self, + req: &CleanupEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_IMPORT_KV_CLEANUP_ENGINE, req, opt) + } + pub fn cleanup_engine( + &self, + req: &CleanupEngineRequest, + ) -> ::grpcio::Result { + self.cleanup_engine_opt(req, ::grpcio::CallOption::default()) + } + pub fn cleanup_engine_async_opt( + &self, + req: &CleanupEngineRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_KV_CLEANUP_ENGINE, req, opt) + } + pub fn cleanup_engine_async( + &self, + req: &CleanupEngineRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.cleanup_engine_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn compact_cluster_opt( + &self, + req: &CompactClusterRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_IMPORT_KV_COMPACT_CLUSTER, req, opt) + } + pub fn compact_cluster( + &self, + req: &CompactClusterRequest, + ) -> ::grpcio::Result { + self.compact_cluster_opt(req, ::grpcio::CallOption::default()) + } + pub fn compact_cluster_async_opt( + &self, + req: &CompactClusterRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_KV_COMPACT_CLUSTER, req, opt) + } + pub fn compact_cluster_async( + &self, + req: &CompactClusterRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.compact_cluster_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) + where + F: ::futures::Future + Send + 'static, + { + self.client.spawn(f) + } } pub trait ImportKv { -fn switch_mode(&mut self, ctx: ::grpcio::RpcContext, req: SwitchModeRequest, sink: ::grpcio::UnarySink); -fn open_engine(&mut self, ctx: ::grpcio::RpcContext, req: OpenEngineRequest, sink: ::grpcio::UnarySink); -fn write_engine(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::ClientStreamingSink); -fn close_engine(&mut self, ctx: ::grpcio::RpcContext, req: CloseEngineRequest, sink: ::grpcio::UnarySink); -fn import_engine(&mut self, ctx: ::grpcio::RpcContext, req: ImportEngineRequest, sink: ::grpcio::UnarySink); -fn cleanup_engine(&mut self, ctx: ::grpcio::RpcContext, req: CleanupEngineRequest, sink: ::grpcio::UnarySink); -fn compact_cluster(&mut self, ctx: ::grpcio::RpcContext, req: CompactClusterRequest, sink: ::grpcio::UnarySink); + fn switch_mode( + &mut self, + ctx: ::grpcio::RpcContext, + req: SwitchModeRequest, + sink: ::grpcio::UnarySink, + ); + fn open_engine( + &mut self, + ctx: ::grpcio::RpcContext, + req: OpenEngineRequest, + sink: ::grpcio::UnarySink, + ); + fn write_engine( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::ClientStreamingSink, + ); + fn close_engine( + &mut self, + ctx: ::grpcio::RpcContext, + req: CloseEngineRequest, + sink: ::grpcio::UnarySink, + ); + fn import_engine( + &mut self, + ctx: ::grpcio::RpcContext, + req: ImportEngineRequest, + sink: ::grpcio::UnarySink, + ); + fn cleanup_engine( + &mut self, + ctx: ::grpcio::RpcContext, + req: CleanupEngineRequest, + sink: ::grpcio::UnarySink, + ); + fn compact_cluster( + &mut self, + ctx: ::grpcio::RpcContext, + req: CompactClusterRequest, + sink: ::grpcio::UnarySink, + ); } pub fn create_import_kv(s: S) -> ::grpcio::Service { -let mut builder = ::grpcio::ServiceBuilder::new(); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_KV_SWITCH_MODE, move |ctx, req, resp| instance.switch_mode(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_KV_OPEN_ENGINE, move |ctx, req, resp| instance.open_engine(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_client_streaming_handler(&METHOD_IMPORT_KV_WRITE_ENGINE, move |ctx, req, resp| instance.write_engine(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_KV_CLOSE_ENGINE, move |ctx, req, resp| instance.close_engine(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_KV_IMPORT_ENGINE, move |ctx, req, resp| instance.import_engine(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_KV_CLEANUP_ENGINE, move |ctx, req, resp| instance.cleanup_engine(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_KV_COMPACT_CLUSTER, move |ctx, req, resp| instance.compact_cluster(ctx, req, resp)); -builder.build() + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_KV_SWITCH_MODE, move |ctx, req, resp| { + instance.switch_mode(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_KV_OPEN_ENGINE, move |ctx, req, resp| { + instance.open_engine(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_client_streaming_handler(&METHOD_IMPORT_KV_WRITE_ENGINE, move |ctx, req, resp| { + instance.write_engine(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_KV_CLOSE_ENGINE, move |ctx, req, resp| { + instance.close_engine(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_KV_IMPORT_ENGINE, move |ctx, req, resp| { + instance.import_engine(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_KV_CLEANUP_ENGINE, move |ctx, req, resp| { + instance.cleanup_engine(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_unary_handler(&METHOD_IMPORT_KV_COMPACT_CLUSTER, move |ctx, req, resp| { + instance.compact_cluster(ctx, req, resp) + }); + builder.build() } diff --git a/src/prost/import_sstpb.rs b/src/prost/import_sstpb.rs index b9edf202a..432af3c0f 100644 --- a/src/prost/import_sstpb.rs +++ b/src/prost/import_sstpb.rs @@ -1,62 +1,60 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct SwitchModeRequest { - #[prost(enumeration="SwitchMode", tag="1")] + #[prost(enumeration = "SwitchMode", tag = "1")] pub mode: i32, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SwitchModeResponse { -} +pub struct SwitchModeResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct Range { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub start: std::vec::Vec, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub end: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SstMeta { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub uuid: std::vec::Vec, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub range: ::std::option::Option, - #[prost(uint32, tag="3")] + #[prost(uint32, tag = "3")] pub crc32: u32, - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub length: u64, - #[prost(string, tag="5")] + #[prost(string, tag = "5")] pub cf_name: std::string::String, - #[prost(uint64, tag="6")] + #[prost(uint64, tag = "6")] pub region_id: u64, - #[prost(message, optional, tag="7")] + #[prost(message, optional, tag = "7")] pub region_epoch: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct UploadRequest { - #[prost(oneof="upload_request::Chunk", tags="1, 2")] + #[prost(oneof = "upload_request::Chunk", tags = "1, 2")] pub chunk: ::std::option::Option, } pub mod upload_request { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Chunk { - #[prost(message, tag="1")] + #[prost(message, tag = "1")] Meta(super::SstMeta), - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] Data(std::vec::Vec), } } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct UploadResponse { -} +pub struct UploadResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngestRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub sst: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngestResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] @@ -64,59 +62,222 @@ pub struct CompactRequest { /// Compact files in the range and above the output level. /// Compact all files if the range is not specified. /// Compact all files to the bottommost level if the output level is -1. - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub range: ::std::option::Option, - #[prost(int32, tag="2")] + #[prost(int32, tag = "2")] pub output_level: i32, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompactResponse { -} +pub struct CompactResponse {} #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum SwitchMode { Normal = 0, Import = 1, } -const METHOD_IMPORT_SST_SWITCH_MODE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_sstpb.ImportSST/SwitchMode", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_SST_UPLOAD: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ClientStreaming, name: "/import_sstpb.ImportSST/Upload", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_SST_INGEST: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_sstpb.ImportSST/Ingest", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_IMPORT_SST_COMPACT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/import_sstpb.ImportSST/Compact", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; +const METHOD_IMPORT_SST_SWITCH_MODE: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_sstpb.ImportSST/SwitchMode", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_SST_UPLOAD: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::ClientStreaming, + name: "/import_sstpb.ImportSST/Upload", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_SST_INGEST: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_sstpb.ImportSST/Ingest", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_IMPORT_SST_COMPACT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/import_sstpb.ImportSST/Compact", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; #[derive(Clone)] -pub struct ImportSstClient { client: ::grpcio::Client } +pub struct ImportSstClient { + client: ::grpcio::Client, +} impl ImportSstClient { -pub fn new(channel: ::grpcio::Channel) -> Self { ImportSstClient { client: ::grpcio::Client::new(channel) }} -pub fn switch_mode_opt(&self, req: &SwitchModeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_SST_SWITCH_MODE, req, opt) } -pub fn switch_mode(&self, req: &SwitchModeRequest) -> ::grpcio::Result { self.switch_mode_opt(req, ::grpcio::CallOption::default()) } -pub fn switch_mode_async_opt(&self, req: &SwitchModeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_SST_SWITCH_MODE, req, opt) } -pub fn switch_mode_async(&self, req: &SwitchModeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.switch_mode_async_opt(req, ::grpcio::CallOption::default()) } -pub fn upload_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.client.client_streaming(&METHOD_IMPORT_SST_UPLOAD, opt) } -pub fn upload(&self) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.upload_opt(::grpcio::CallOption::default()) } -pub fn ingest_opt(&self, req: &IngestRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_SST_INGEST, req, opt) } -pub fn ingest(&self, req: &IngestRequest) -> ::grpcio::Result { self.ingest_opt(req, ::grpcio::CallOption::default()) } -pub fn ingest_async_opt(&self, req: &IngestRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_SST_INGEST, req, opt) } -pub fn ingest_async(&self, req: &IngestRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.ingest_async_opt(req, ::grpcio::CallOption::default()) } -pub fn compact_opt(&self, req: &CompactRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_IMPORT_SST_COMPACT, req, opt) } -pub fn compact(&self, req: &CompactRequest) -> ::grpcio::Result { self.compact_opt(req, ::grpcio::CallOption::default()) } -pub fn compact_async_opt(&self, req: &CompactRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_IMPORT_SST_COMPACT, req, opt) } -pub fn compact_async(&self, req: &CompactRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.compact_async_opt(req, ::grpcio::CallOption::default()) } -pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static {self.client.spawn(f)} + pub fn new(channel: ::grpcio::Channel) -> Self { + ImportSstClient { + client: ::grpcio::Client::new(channel), + } + } + pub fn switch_mode_opt( + &self, + req: &SwitchModeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_IMPORT_SST_SWITCH_MODE, req, opt) + } + pub fn switch_mode(&self, req: &SwitchModeRequest) -> ::grpcio::Result { + self.switch_mode_opt(req, ::grpcio::CallOption::default()) + } + pub fn switch_mode_async_opt( + &self, + req: &SwitchModeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_SST_SWITCH_MODE, req, opt) + } + pub fn switch_mode_async( + &self, + req: &SwitchModeRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.switch_mode_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn upload_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.client.client_streaming(&METHOD_IMPORT_SST_UPLOAD, opt) + } + pub fn upload( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.upload_opt(::grpcio::CallOption::default()) + } + pub fn ingest_opt( + &self, + req: &IngestRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_IMPORT_SST_INGEST, req, opt) + } + pub fn ingest(&self, req: &IngestRequest) -> ::grpcio::Result { + self.ingest_opt(req, ::grpcio::CallOption::default()) + } + pub fn ingest_async_opt( + &self, + req: &IngestRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_SST_INGEST, req, opt) + } + pub fn ingest_async( + &self, + req: &IngestRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.ingest_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn compact_opt( + &self, + req: &CompactRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_IMPORT_SST_COMPACT, req, opt) + } + pub fn compact(&self, req: &CompactRequest) -> ::grpcio::Result { + self.compact_opt(req, ::grpcio::CallOption::default()) + } + pub fn compact_async_opt( + &self, + req: &CompactRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_IMPORT_SST_COMPACT, req, opt) + } + pub fn compact_async( + &self, + req: &CompactRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.compact_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) + where + F: ::futures::Future + Send + 'static, + { + self.client.spawn(f) + } } pub trait ImportSst { -fn switch_mode(&mut self, ctx: ::grpcio::RpcContext, req: SwitchModeRequest, sink: ::grpcio::UnarySink); -fn upload(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::ClientStreamingSink); -fn ingest(&mut self, ctx: ::grpcio::RpcContext, req: IngestRequest, sink: ::grpcio::UnarySink); -fn compact(&mut self, ctx: ::grpcio::RpcContext, req: CompactRequest, sink: ::grpcio::UnarySink); + fn switch_mode( + &mut self, + ctx: ::grpcio::RpcContext, + req: SwitchModeRequest, + sink: ::grpcio::UnarySink, + ); + fn upload( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::ClientStreamingSink, + ); + fn ingest( + &mut self, + ctx: ::grpcio::RpcContext, + req: IngestRequest, + sink: ::grpcio::UnarySink, + ); + fn compact( + &mut self, + ctx: ::grpcio::RpcContext, + req: CompactRequest, + sink: ::grpcio::UnarySink, + ); } pub fn create_import_sst(s: S) -> ::grpcio::Service { -let mut builder = ::grpcio::ServiceBuilder::new(); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_SST_SWITCH_MODE, move |ctx, req, resp| instance.switch_mode(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_client_streaming_handler(&METHOD_IMPORT_SST_UPLOAD, move |ctx, req, resp| instance.upload(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_SST_INGEST, move |ctx, req, resp| instance.ingest(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_IMPORT_SST_COMPACT, move |ctx, req, resp| instance.compact(ctx, req, resp)); -builder.build() + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_SST_SWITCH_MODE, move |ctx, req, resp| { + instance.switch_mode(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_client_streaming_handler(&METHOD_IMPORT_SST_UPLOAD, move |ctx, req, resp| { + instance.upload(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_SST_INGEST, move |ctx, req, resp| { + instance.ingest(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_IMPORT_SST_COMPACT, move |ctx, req, resp| { + instance.compact(ctx, req, resp) + }); + builder.build() } diff --git a/src/prost/kvrpcpb.rs b/src/prost/kvrpcpb.rs index ee81d2db1..8c82d5f4c 100644 --- a/src/prost/kvrpcpb.rs +++ b/src/prost/kvrpcpb.rs @@ -1,719 +1,719 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct LockInfo { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub primary_lock: std::vec::Vec, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub lock_version: u64, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub key: std::vec::Vec, - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub lock_ttl: u64, /// How many keys this transaction involved. - #[prost(uint64, tag="5")] + #[prost(uint64, tag = "5")] pub txn_size: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AlreadyExist { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyError { /// Client should backoff or cleanup the lock then retry. - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub locked: ::std::option::Option, /// Client may restart the txn. e.g write conflict. - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub retryable: std::string::String, /// Client should abort the txn. - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub abort: std::string::String, /// Write conflict is moved from retryable to here. - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub conflict: ::std::option::Option, /// Key already exists - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub already_exist: ::std::option::Option, /// Deadlock is used in pessimistic transaction for single statement rollback. - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub deadlock: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteConflict { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub start_ts: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub conflict_ts: u64, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub key: std::vec::Vec, - #[prost(bytes, tag="4")] + #[prost(bytes, tag = "4")] pub primary: std::vec::Vec, - #[prost(uint64, tag="5")] + #[prost(uint64, tag = "5")] pub conflict_commit_ts: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Deadlock { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub lock_ts: u64, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub lock_key: std::vec::Vec, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub deadlock_key_hash: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Context { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region_epoch: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub peer: ::std::option::Option, - #[prost(uint64, tag="5")] + #[prost(uint64, tag = "5")] pub term: u64, - #[prost(enumeration="CommandPri", tag="6")] + #[prost(enumeration = "CommandPri", tag = "6")] pub priority: i32, - #[prost(enumeration="IsolationLevel", tag="7")] + #[prost(enumeration = "IsolationLevel", tag = "7")] pub isolation_level: i32, - #[prost(bool, tag="8")] + #[prost(bool, tag = "8")] pub not_fill_cache: bool, - #[prost(bool, tag="9")] + #[prost(bool, tag = "9")] pub sync_log: bool, /// true means return handle time detail - #[prost(bool, tag="10")] + #[prost(bool, tag = "10")] pub handle_time: bool, /// true means return scan cf's detail - #[prost(bool, tag="11")] + #[prost(bool, tag = "11")] pub scan_detail: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct HandleTime { /// time in queue - #[prost(int64, tag="1")] + #[prost(int64, tag = "1")] pub wait_ms: i64, /// process time without wait time. - #[prost(int64, tag="2")] + #[prost(int64, tag = "2")] pub process_ms: i64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanInfo { /// total count - #[prost(int64, tag="1")] + #[prost(int64, tag = "1")] pub total: i64, /// processed count - #[prost(int64, tag="2")] + #[prost(int64, tag = "2")] pub processed: i64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanDetail { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub write: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub lock: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub data: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecDetails { /// set when ctx.handle_time = true or meet slow query - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub handle_time: ::std::option::Option, /// set when ctx.scan_detail = true or meet slow query - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub scan_detail: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub version: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(uint32, tag="3")] + #[prost(uint32, tag = "3")] pub limit: u32, - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub version: u64, - #[prost(bool, tag="5")] + #[prost(bool, tag = "5")] pub key_only: bool, - #[prost(bool, tag="6")] + #[prost(bool, tag = "6")] pub reverse: bool, /// For compatibility, when scanning forward, the range to scan is [start_key, end_key), where start_key < end_key; /// and when scanning backward, it scans [end_key, start_key) in descending order, where end_key < start_key. - #[prost(bytes, tag="7")] + #[prost(bytes, tag = "7")] pub end_key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct KvPair { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub error: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub pairs: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Mutation { - #[prost(enumeration="Op", tag="1")] + #[prost(enumeration = "Op", tag = "1")] pub op: i32, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub value: std::vec::Vec, - #[prost(enumeration="Assertion", tag="4")] + #[prost(enumeration = "Assertion", tag = "4")] pub assertion: i32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrewriteRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub mutations: ::std::vec::Vec, /// primary_lock_key - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub primary_lock: std::vec::Vec, - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub start_version: u64, - #[prost(uint64, tag="5")] + #[prost(uint64, tag = "5")] pub lock_ttl: u64, - #[prost(bool, tag="6")] + #[prost(bool, tag = "6")] pub skip_constraint_check: bool, /// For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key. - #[prost(bool, repeated, tag="7")] + #[prost(bool, repeated, tag = "7")] pub is_pessimistic_lock: ::std::vec::Vec, /// How many keys this transaction involved. - #[prost(uint64, tag="8")] + #[prost(uint64, tag = "8")] pub txn_size: u64, /// Use for pessimistic transaction, used to check if a conflict lock is already committed. - #[prost(uint64, tag="9")] + #[prost(uint64, tag = "9")] pub for_update_ts: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrewriteResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub errors: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PessimisticLockRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, /// In this case the Op of the mutation must be Lock. - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub mutations: ::std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub primary_lock: std::vec::Vec, - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub start_version: u64, - #[prost(uint64, tag="5")] + #[prost(uint64, tag = "5")] pub lock_ttl: u64, - #[prost(uint64, tag="6")] + #[prost(uint64, tag = "6")] pub for_update_ts: u64, /// If the request is the first lock request, we don't need to detect deadlock. - #[prost(bool, tag="7")] + #[prost(bool, tag = "7")] pub is_first_lock: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PessimisticLockResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub errors: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PessimisticRollbackRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub start_version: u64, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub for_update_ts: u64, - #[prost(bytes, repeated, tag="4")] + #[prost(bytes, repeated, tag = "4")] pub keys: ::std::vec::Vec>, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PessimisticRollbackResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub errors: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub start_version: u64, - #[prost(bytes, repeated, tag="3")] + #[prost(bytes, repeated, tag = "3")] pub keys: ::std::vec::Vec>, - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub commit_version: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportRequest { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub mutations: ::std::vec::Vec, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub commit_version: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchRollbackRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub start_version: u64, - #[prost(bytes, repeated, tag="3")] + #[prost(bytes, repeated, tag = "3")] pub keys: ::std::vec::Vec>, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchRollbackResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CleanupRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub start_version: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CleanupResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, /// set this if the key is already committed - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub commit_version: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchGetRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, repeated, tag="2")] + #[prost(bytes, repeated, tag = "2")] pub keys: ::std::vec::Vec>, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub version: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchGetResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub pairs: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanLockRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub max_version: u64, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub start_key: std::vec::Vec, - #[prost(uint32, tag="4")] + #[prost(uint32, tag = "4")] pub limit: u32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanLockResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, - #[prost(message, repeated, tag="3")] + #[prost(message, repeated, tag = "3")] pub locks: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxnInfo { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub txn: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub status: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResolveLockRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub start_version: u64, /// If the txn is rolled back, do not set it. - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub commit_version: u64, - #[prost(message, repeated, tag="4")] + #[prost(message, repeated, tag = "4")] pub txn_infos: ::std::vec::Vec, /// Only resolve specified keys. - #[prost(bytes, repeated, tag="5")] + #[prost(bytes, repeated, tag = "5")] pub keys: ::std::vec::Vec>, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResolveLockResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub safe_point: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawGetRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub cf: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawGetResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawPutRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub value: std::vec::Vec, - #[prost(string, tag="4")] + #[prost(string, tag = "4")] pub cf: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawPutResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchPutRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub pairs: ::std::vec::Vec, - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub cf: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchPutResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchGetRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, repeated, tag="2")] + #[prost(bytes, repeated, tag = "2")] pub keys: ::std::vec::Vec>, - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub cf: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchGetResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub pairs: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawDeleteRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub cf: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawDeleteResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchDeleteRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, repeated, tag="2")] + #[prost(bytes, repeated, tag = "2")] pub keys: ::std::vec::Vec>, - #[prost(string, tag="3")] + #[prost(string, tag = "3")] pub cf: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchDeleteResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRangeRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub end_key: std::vec::Vec, - #[prost(bool, tag="4")] + #[prost(bool, tag = "4")] pub notify_only: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRangeResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawDeleteRangeRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub end_key: std::vec::Vec, - #[prost(string, tag="4")] + #[prost(string, tag = "4")] pub cf: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawDeleteRangeResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawScanRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(uint32, tag="3")] + #[prost(uint32, tag = "3")] pub limit: u32, - #[prost(bool, tag="4")] + #[prost(bool, tag = "4")] pub key_only: bool, - #[prost(string, tag="5")] + #[prost(string, tag = "5")] pub cf: std::string::String, - #[prost(bool, tag="6")] + #[prost(bool, tag = "6")] pub reverse: bool, /// For compatibility, when scanning forward, the range to scan is [start_key, end_key), where start_key < end_key; /// and when scanning backward, it scans [end_key, start_key) in descending order, where end_key < start_key. - #[prost(bytes, tag="7")] + #[prost(bytes, tag = "7")] pub end_key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawScanResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub kvs: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyRange { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub end_key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchScanRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, /// scanning range - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub ranges: ::std::vec::Vec, /// max number of returning kv pairs for each scanning range - #[prost(uint32, tag="3")] + #[prost(uint32, tag = "3")] pub each_limit: u32, - #[prost(bool, tag="4")] + #[prost(bool, tag = "4")] pub key_only: bool, - #[prost(string, tag="5")] + #[prost(string, tag = "5")] pub cf: std::string::String, - #[prost(bool, tag="6")] + #[prost(bool, tag = "6")] pub reverse: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchScanResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub kvs: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccWrite { - #[prost(enumeration="Op", tag="1")] + #[prost(enumeration = "Op", tag = "1")] pub r#type: i32, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub start_ts: u64, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub commit_ts: u64, - #[prost(bytes, tag="4")] + #[prost(bytes, tag = "4")] pub short_value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccValue { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub start_ts: u64, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccLock { - #[prost(enumeration="Op", tag="1")] + #[prost(enumeration = "Op", tag = "1")] pub r#type: i32, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub start_ts: u64, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub primary: std::vec::Vec, - #[prost(bytes, tag="4")] + #[prost(bytes, tag = "4")] pub short_value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccInfo { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub lock: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub writes: ::std::vec::Vec, - #[prost(message, repeated, tag="3")] + #[prost(message, repeated, tag = "3")] pub values: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccGetByKeyRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccGetByKeyResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub info: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccGetByStartTsRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub start_ts: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccGetByStartTsResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub key: std::vec::Vec, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub info: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitRegionRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub split_key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitRegionResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub left: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub right: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsafeDestroyRangeRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub end_key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsafeDestroyRangeResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub error: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadIndexRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub context: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadIndexResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region_error: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub read_index: u64, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] diff --git a/src/prost/metapb.rs b/src/prost/metapb.rs index b4d3c75d9..66866dbc3 100644 --- a/src/prost/metapb.rs +++ b/src/prost/metapb.rs @@ -1,66 +1,66 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct Cluster { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub id: u64, /// max peer count for a region. /// pd will do the auto-balance if region peer count mismatches. /// /// more attributes...... - #[prost(uint32, tag="2")] + #[prost(uint32, tag = "2")] pub max_peer_count: u32, } /// Case insensitive key/value for replica constraints. #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreLabel { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub key: std::string::String, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub value: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Store { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub id: u64, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub address: std::string::String, - #[prost(enumeration="StoreState", tag="3")] + #[prost(enumeration = "StoreState", tag = "3")] pub state: i32, - #[prost(message, repeated, tag="4")] + #[prost(message, repeated, tag = "4")] pub labels: ::std::vec::Vec, /// more attributes...... - #[prost(string, tag="5")] + #[prost(string, tag = "5")] pub version: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionEpoch { /// Conf change version, auto increment when add or remove peer - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub conf_ver: u64, /// Region version, auto increment when split or merge - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub version: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Region { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub id: u64, /// Region key range [start_key, end_key). - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub end_key: std::vec::Vec, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub region_epoch: ::std::option::Option, - #[prost(message, repeated, tag="5")] + #[prost(message, repeated, tag = "5")] pub peers: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Peer { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub id: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub store_id: u64, - #[prost(bool, tag="3")] + #[prost(bool, tag = "3")] pub is_learner: bool, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] diff --git a/src/prost/pdpb.rs b/src/prost/pdpb.rs index 55abac559..025d0b723 100644 --- a/src/prost/pdpb.rs +++ b/src/prost/pdpb.rs @@ -1,296 +1,296 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestHeader { /// cluster_id is the ID of the cluster which be sent to. - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub cluster_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseHeader { /// cluster_id is the ID of the cluster which sent the response. - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub cluster_id: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub error: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { - #[prost(enumeration="ErrorType", tag="1")] + #[prost(enumeration = "ErrorType", tag = "1")] pub r#type: i32, - #[prost(string, tag="2")] + #[prost(string, tag = "2")] pub message: std::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct TsoRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint32, tag="2")] + #[prost(uint32, tag = "2")] pub count: u32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Timestamp { - #[prost(int64, tag="1")] + #[prost(int64, tag = "1")] pub physical: i64, - #[prost(int64, tag="2")] + #[prost(int64, tag = "2")] pub logical: i64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct TsoResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint32, tag="2")] + #[prost(uint32, tag = "2")] pub count: u32, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub timestamp: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BootstrapRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub store: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub region: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BootstrapResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct IsBootstrappedRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct IsBootstrappedResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(bool, tag="2")] + #[prost(bool, tag = "2")] pub bootstrapped: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AllocIdRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AllocIdResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetStoreRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub store_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetStoreResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub store: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub stats: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PutStoreRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub store: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PutStoreResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAllStoresRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, /// Do NOT return tombstone stores if set to true. - #[prost(bool, tag="2")] + #[prost(bool, tag = "2")] pub exclude_tombstone_stores: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAllStoresResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub stores: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub region_key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub leader: ::std::option::Option, - #[prost(message, repeated, tag="4")] + #[prost(message, repeated, tag = "4")] pub slaves: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionByIdRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub region_id: u64, } // Use GetRegionResponse as the response of GetRegionByIDRequest. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanRegionsRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(int32, tag="3")] + #[prost(int32, tag = "3")] pub limit: i32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanRegionsResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub regions: ::std::vec::Vec, - #[prost(message, repeated, tag="3")] + #[prost(message, repeated, tag = "3")] pub leaders: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetClusterConfigRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetClusterConfigResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub cluster: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PutClusterConfigRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub cluster: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PutClusterConfigResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { /// name is the name of the PD member. - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub name: std::string::String, /// member_id is the unique id of the PD member. - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub member_id: u64, - #[prost(string, repeated, tag="3")] + #[prost(string, repeated, tag = "3")] pub peer_urls: ::std::vec::Vec, - #[prost(string, repeated, tag="4")] + #[prost(string, repeated, tag = "4")] pub client_urls: ::std::vec::Vec, - #[prost(int32, tag="5")] + #[prost(int32, tag = "5")] pub leader_priority: i32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMembersRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMembersResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub members: ::std::vec::Vec, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub leader: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub etcd_leader: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeerStats { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub peer: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub down_seconds: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionHeartbeatRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region: ::std::option::Option, /// Leader Peer sending the heartbeat. - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub leader: ::std::option::Option, /// Leader considers that these peers are down. - #[prost(message, repeated, tag="4")] + #[prost(message, repeated, tag = "4")] pub down_peers: ::std::vec::Vec, /// Pending peers are the peers that the leader can't consider as /// working followers. - #[prost(message, repeated, tag="5")] + #[prost(message, repeated, tag = "5")] pub pending_peers: ::std::vec::Vec, /// Bytes read/written during this period. - #[prost(uint64, tag="6")] + #[prost(uint64, tag = "6")] pub bytes_written: u64, - #[prost(uint64, tag="7")] + #[prost(uint64, tag = "7")] pub bytes_read: u64, /// Keys read/written during this period. - #[prost(uint64, tag="8")] + #[prost(uint64, tag = "8")] pub keys_written: u64, - #[prost(uint64, tag="9")] + #[prost(uint64, tag = "9")] pub keys_read: u64, /// Approximate region size. - #[prost(uint64, tag="10")] + #[prost(uint64, tag = "10")] pub approximate_size: u64, /// Actually reported time interval - #[prost(message, optional, tag="12")] + #[prost(message, optional, tag = "12")] pub interval: ::std::option::Option, /// Approximate number of keys. - #[prost(uint64, tag="13")] + #[prost(uint64, tag = "13")] pub approximate_keys: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangePeer { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub peer: ::std::option::Option, - #[prost(enumeration="super::eraftpb::ConfChangeType", tag="2")] + #[prost(enumeration = "super::eraftpb::ConfChangeType", tag = "2")] pub change_type: i32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransferLeader { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub peer: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Merge { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub target: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitRegion { - #[prost(enumeration="CheckPolicy", tag="1")] + #[prost(enumeration = "CheckPolicy", tag = "1")] pub policy: i32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionHeartbeatResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, /// Notice, Pd only allows handling reported epoch >= current pd's. /// Leader peer reports region status with RegionHeartbeatRequest @@ -306,246 +306,246 @@ pub struct RegionHeartbeatResponse { /// 4. Leader may report old Peers (1), ConfVer (1) to pd before ConfChange /// finished, pd stills responses ChangePeer Adding 2, of course, we must /// guarantee the second ChangePeer can't be applied in TiKV. - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub change_peer: ::std::option::Option, /// Pd can return transfer_leader to let TiKV does leader transfer itself. - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub transfer_leader: ::std::option::Option, /// ID of the region - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub region_id: u64, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub region_epoch: ::std::option::Option, /// Leader of the region at the moment of the corresponding request was made. - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub target_peer: ::std::option::Option, - #[prost(message, optional, tag="7")] + #[prost(message, optional, tag = "7")] pub merge: ::std::option::Option, /// PD sends split_region to let TiKV split a region into two regions. - #[prost(message, optional, tag="8")] + #[prost(message, optional, tag = "8")] pub split_region: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskSplitRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskSplitResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, /// We split the region into two, first uses the origin /// parent region id, and the second uses the new_region_id. /// We must guarantee that the new_region_id is global unique. - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub new_region_id: u64, /// The peer ids for the new split region. - #[prost(uint64, repeated, tag="3")] + #[prost(uint64, repeated, tag = "3")] pub new_peer_ids: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportSplitRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub left: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub right: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportSplitResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskBatchSplitRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region: ::std::option::Option, - #[prost(uint32, tag="3")] + #[prost(uint32, tag = "3")] pub split_count: u32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitId { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub new_region_id: u64, - #[prost(uint64, repeated, tag="2")] + #[prost(uint64, repeated, tag = "2")] pub new_peer_ids: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskBatchSplitResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub ids: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportBatchSplitRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub regions: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportBatchSplitResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct TimeInterval { /// The unix timestamp in seconds of the start of this period. - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub start_timestamp: u64, /// The unix timestamp in seconds of the end of this period. - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub end_timestamp: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreStats { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub store_id: u64, /// Capacity for the store. - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub capacity: u64, /// Available size for the store. - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub available: u64, /// Total region count in this store. - #[prost(uint32, tag="4")] + #[prost(uint32, tag = "4")] pub region_count: u32, /// Current sending snapshot count. - #[prost(uint32, tag="5")] + #[prost(uint32, tag = "5")] pub sending_snap_count: u32, /// Current receiving snapshot count. - #[prost(uint32, tag="6")] + #[prost(uint32, tag = "6")] pub receiving_snap_count: u32, /// When the store is started (unix timestamp in seconds). - #[prost(uint32, tag="7")] + #[prost(uint32, tag = "7")] pub start_time: u32, /// How many region is applying snapshot. - #[prost(uint32, tag="8")] + #[prost(uint32, tag = "8")] pub applying_snap_count: u32, /// If the store is busy - #[prost(bool, tag="9")] + #[prost(bool, tag = "9")] pub is_busy: bool, /// Actually used space by db - #[prost(uint64, tag="10")] + #[prost(uint64, tag = "10")] pub used_size: u64, /// Bytes written for the store during this period. - #[prost(uint64, tag="11")] + #[prost(uint64, tag = "11")] pub bytes_written: u64, /// Keys written for the store during this period. - #[prost(uint64, tag="12")] + #[prost(uint64, tag = "12")] pub keys_written: u64, /// Bytes read for the store during this period. - #[prost(uint64, tag="13")] + #[prost(uint64, tag = "13")] pub bytes_read: u64, /// Keys read for the store during this period. - #[prost(uint64, tag="14")] + #[prost(uint64, tag = "14")] pub keys_read: u64, /// Actually reported time interval - #[prost(message, optional, tag="15")] + #[prost(message, optional, tag = "15")] pub interval: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreHeartbeatRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub stats: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreHeartbeatResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScatterRegionRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub region_id: u64, /// PD will use these region information if it can't find the region. /// For example, the region is just split and hasn't report to PD yet. - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub region: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub leader: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScatterRegionResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetGcSafePointRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetGcSafePointResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub safe_point: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateGcSafePointRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub safe_point: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateGcSafePointResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub new_safe_point: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SyncRegionRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub member: ::std::option::Option, /// the follower PD will use the start index to locate historical changes /// that require synchronization. - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub start_index: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SyncRegionResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, /// the leader PD will send the repsonds include /// changed regions records and the index of the first record. - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub regions: ::std::vec::Vec, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub start_index: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetOperatorRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub region_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetOperatorResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub region_id: u64, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub desc: std::vec::Vec, - #[prost(enumeration="OperatorStatus", tag="4")] + #[prost(enumeration = "OperatorStatus", tag = "4")] pub status: i32, - #[prost(bytes, tag="5")] + #[prost(bytes, tag = "5")] pub kind: std::vec::Vec, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -574,209 +574,1222 @@ pub enum OperatorStatus { Replace = 3, Running = 4, } -const METHOD_PD_GET_MEMBERS: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetMembers", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_TSO: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Duplex, name: "/pdpb.PD/Tso", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_BOOTSTRAP: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/Bootstrap", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_IS_BOOTSTRAPPED: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/IsBootstrapped", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_ALLOC_ID: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/AllocID", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_STORE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetStore", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_PUT_STORE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/PutStore", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_ALL_STORES: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetAllStores", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_STORE_HEARTBEAT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/StoreHeartbeat", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_REGION_HEARTBEAT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Duplex, name: "/pdpb.PD/RegionHeartbeat", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_REGION: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetRegion", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_PREV_REGION: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetPrevRegion", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_REGION_BY_ID: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetRegionByID", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_SCAN_REGIONS: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/ScanRegions", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_ASK_SPLIT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/AskSplit", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_REPORT_SPLIT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/ReportSplit", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_ASK_BATCH_SPLIT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/AskBatchSplit", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_REPORT_BATCH_SPLIT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/ReportBatchSplit", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_CLUSTER_CONFIG: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetClusterConfig", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_PUT_CLUSTER_CONFIG: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/PutClusterConfig", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_SCATTER_REGION: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/ScatterRegion", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_GC_SAFE_POINT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetGCSafePoint", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_UPDATE_GC_SAFE_POINT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/UpdateGCSafePoint", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_SYNC_REGIONS: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Duplex, name: "/pdpb.PD/SyncRegions", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_PD_GET_OPERATOR: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/pdpb.PD/GetOperator", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; +const METHOD_PD_GET_MEMBERS: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetMembers", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_TSO: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/pdpb.PD/Tso", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_BOOTSTRAP: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/Bootstrap", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_IS_BOOTSTRAPPED: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/IsBootstrapped", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_ALLOC_ID: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/AllocID", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_GET_STORE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetStore", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_PUT_STORE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/PutStore", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_GET_ALL_STORES: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetAllStores", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_STORE_HEARTBEAT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/StoreHeartbeat", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_REGION_HEARTBEAT: ::grpcio::Method< + RegionHeartbeatRequest, + RegionHeartbeatResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/pdpb.PD/RegionHeartbeat", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_GET_REGION: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetRegion", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_GET_PREV_REGION: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetPrevRegion", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_GET_REGION_BY_ID: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetRegionByID", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_SCAN_REGIONS: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/ScanRegions", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_ASK_SPLIT: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/AskSplit", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_REPORT_SPLIT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/ReportSplit", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_ASK_BATCH_SPLIT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/AskBatchSplit", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_REPORT_BATCH_SPLIT: ::grpcio::Method< + ReportBatchSplitRequest, + ReportBatchSplitResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/ReportBatchSplit", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_GET_CLUSTER_CONFIG: ::grpcio::Method< + GetClusterConfigRequest, + GetClusterConfigResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetClusterConfig", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_PUT_CLUSTER_CONFIG: ::grpcio::Method< + PutClusterConfigRequest, + PutClusterConfigResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/PutClusterConfig", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_SCATTER_REGION: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/ScatterRegion", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_GET_GC_SAFE_POINT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetGCSafePoint", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_UPDATE_GC_SAFE_POINT: ::grpcio::Method< + UpdateGcSafePointRequest, + UpdateGcSafePointResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/UpdateGCSafePoint", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_PD_SYNC_REGIONS: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/pdpb.PD/SyncRegions", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_PD_GET_OPERATOR: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/pdpb.PD/GetOperator", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; #[derive(Clone)] -pub struct PdClient { client: ::grpcio::Client } +pub struct PdClient { + client: ::grpcio::Client, +} impl PdClient { -pub fn new(channel: ::grpcio::Channel) -> Self { PdClient { client: ::grpcio::Client::new(channel) }} -pub fn get_members_opt(&self, req: &GetMembersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_MEMBERS, req, opt) } -pub fn get_members(&self, req: &GetMembersRequest) -> ::grpcio::Result { self.get_members_opt(req, ::grpcio::CallOption::default()) } -pub fn get_members_async_opt(&self, req: &GetMembersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_MEMBERS, req, opt) } -pub fn get_members_async(&self, req: &GetMembersRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_members_async_opt(req, ::grpcio::CallOption::default()) } -pub fn tso_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.client.duplex_streaming(&METHOD_PD_TSO, opt) } -pub fn tso(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.tso_opt(::grpcio::CallOption::default()) } -pub fn bootstrap_opt(&self, req: &BootstrapRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_BOOTSTRAP, req, opt) } -pub fn bootstrap(&self, req: &BootstrapRequest) -> ::grpcio::Result { self.bootstrap_opt(req, ::grpcio::CallOption::default()) } -pub fn bootstrap_async_opt(&self, req: &BootstrapRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_BOOTSTRAP, req, opt) } -pub fn bootstrap_async(&self, req: &BootstrapRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.bootstrap_async_opt(req, ::grpcio::CallOption::default()) } -pub fn is_bootstrapped_opt(&self, req: &IsBootstrappedRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_IS_BOOTSTRAPPED, req, opt) } -pub fn is_bootstrapped(&self, req: &IsBootstrappedRequest) -> ::grpcio::Result { self.is_bootstrapped_opt(req, ::grpcio::CallOption::default()) } -pub fn is_bootstrapped_async_opt(&self, req: &IsBootstrappedRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_IS_BOOTSTRAPPED, req, opt) } -pub fn is_bootstrapped_async(&self, req: &IsBootstrappedRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.is_bootstrapped_async_opt(req, ::grpcio::CallOption::default()) } -pub fn alloc_id_opt(&self, req: &AllocIdRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_ALLOC_ID, req, opt) } -pub fn alloc_id(&self, req: &AllocIdRequest) -> ::grpcio::Result { self.alloc_id_opt(req, ::grpcio::CallOption::default()) } -pub fn alloc_id_async_opt(&self, req: &AllocIdRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_ALLOC_ID, req, opt) } -pub fn alloc_id_async(&self, req: &AllocIdRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.alloc_id_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_store_opt(&self, req: &GetStoreRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_STORE, req, opt) } -pub fn get_store(&self, req: &GetStoreRequest) -> ::grpcio::Result { self.get_store_opt(req, ::grpcio::CallOption::default()) } -pub fn get_store_async_opt(&self, req: &GetStoreRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_STORE, req, opt) } -pub fn get_store_async(&self, req: &GetStoreRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_store_async_opt(req, ::grpcio::CallOption::default()) } -pub fn put_store_opt(&self, req: &PutStoreRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_PUT_STORE, req, opt) } -pub fn put_store(&self, req: &PutStoreRequest) -> ::grpcio::Result { self.put_store_opt(req, ::grpcio::CallOption::default()) } -pub fn put_store_async_opt(&self, req: &PutStoreRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_PUT_STORE, req, opt) } -pub fn put_store_async(&self, req: &PutStoreRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.put_store_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_all_stores_opt(&self, req: &GetAllStoresRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_ALL_STORES, req, opt) } -pub fn get_all_stores(&self, req: &GetAllStoresRequest) -> ::grpcio::Result { self.get_all_stores_opt(req, ::grpcio::CallOption::default()) } -pub fn get_all_stores_async_opt(&self, req: &GetAllStoresRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_ALL_STORES, req, opt) } -pub fn get_all_stores_async(&self, req: &GetAllStoresRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_all_stores_async_opt(req, ::grpcio::CallOption::default()) } -pub fn store_heartbeat_opt(&self, req: &StoreHeartbeatRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_STORE_HEARTBEAT, req, opt) } -pub fn store_heartbeat(&self, req: &StoreHeartbeatRequest) -> ::grpcio::Result { self.store_heartbeat_opt(req, ::grpcio::CallOption::default()) } -pub fn store_heartbeat_async_opt(&self, req: &StoreHeartbeatRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_STORE_HEARTBEAT, req, opt) } -pub fn store_heartbeat_async(&self, req: &StoreHeartbeatRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.store_heartbeat_async_opt(req, ::grpcio::CallOption::default()) } -pub fn region_heartbeat_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.client.duplex_streaming(&METHOD_PD_REGION_HEARTBEAT, opt) } -pub fn region_heartbeat(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.region_heartbeat_opt(::grpcio::CallOption::default()) } -pub fn get_region_opt(&self, req: &GetRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_REGION, req, opt) } -pub fn get_region(&self, req: &GetRegionRequest) -> ::grpcio::Result { self.get_region_opt(req, ::grpcio::CallOption::default()) } -pub fn get_region_async_opt(&self, req: &GetRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_REGION, req, opt) } -pub fn get_region_async(&self, req: &GetRegionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_region_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_prev_region_opt(&self, req: &GetRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_PREV_REGION, req, opt) } -pub fn get_prev_region(&self, req: &GetRegionRequest) -> ::grpcio::Result { self.get_prev_region_opt(req, ::grpcio::CallOption::default()) } -pub fn get_prev_region_async_opt(&self, req: &GetRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_PREV_REGION, req, opt) } -pub fn get_prev_region_async(&self, req: &GetRegionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_prev_region_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_region_by_id_opt(&self, req: &GetRegionByIdRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_REGION_BY_ID, req, opt) } -pub fn get_region_by_id(&self, req: &GetRegionByIdRequest) -> ::grpcio::Result { self.get_region_by_id_opt(req, ::grpcio::CallOption::default()) } -pub fn get_region_by_id_async_opt(&self, req: &GetRegionByIdRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_REGION_BY_ID, req, opt) } -pub fn get_region_by_id_async(&self, req: &GetRegionByIdRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_region_by_id_async_opt(req, ::grpcio::CallOption::default()) } -pub fn scan_regions_opt(&self, req: &ScanRegionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_SCAN_REGIONS, req, opt) } -pub fn scan_regions(&self, req: &ScanRegionsRequest) -> ::grpcio::Result { self.scan_regions_opt(req, ::grpcio::CallOption::default()) } -pub fn scan_regions_async_opt(&self, req: &ScanRegionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_SCAN_REGIONS, req, opt) } -pub fn scan_regions_async(&self, req: &ScanRegionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.scan_regions_async_opt(req, ::grpcio::CallOption::default()) } -pub fn ask_split_opt(&self, req: &AskSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_ASK_SPLIT, req, opt) } -pub fn ask_split(&self, req: &AskSplitRequest) -> ::grpcio::Result { self.ask_split_opt(req, ::grpcio::CallOption::default()) } -pub fn ask_split_async_opt(&self, req: &AskSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_ASK_SPLIT, req, opt) } -pub fn ask_split_async(&self, req: &AskSplitRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.ask_split_async_opt(req, ::grpcio::CallOption::default()) } -pub fn report_split_opt(&self, req: &ReportSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_REPORT_SPLIT, req, opt) } -pub fn report_split(&self, req: &ReportSplitRequest) -> ::grpcio::Result { self.report_split_opt(req, ::grpcio::CallOption::default()) } -pub fn report_split_async_opt(&self, req: &ReportSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_REPORT_SPLIT, req, opt) } -pub fn report_split_async(&self, req: &ReportSplitRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.report_split_async_opt(req, ::grpcio::CallOption::default()) } -pub fn ask_batch_split_opt(&self, req: &AskBatchSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_ASK_BATCH_SPLIT, req, opt) } -pub fn ask_batch_split(&self, req: &AskBatchSplitRequest) -> ::grpcio::Result { self.ask_batch_split_opt(req, ::grpcio::CallOption::default()) } -pub fn ask_batch_split_async_opt(&self, req: &AskBatchSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_ASK_BATCH_SPLIT, req, opt) } -pub fn ask_batch_split_async(&self, req: &AskBatchSplitRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.ask_batch_split_async_opt(req, ::grpcio::CallOption::default()) } -pub fn report_batch_split_opt(&self, req: &ReportBatchSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_REPORT_BATCH_SPLIT, req, opt) } -pub fn report_batch_split(&self, req: &ReportBatchSplitRequest) -> ::grpcio::Result { self.report_batch_split_opt(req, ::grpcio::CallOption::default()) } -pub fn report_batch_split_async_opt(&self, req: &ReportBatchSplitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_REPORT_BATCH_SPLIT, req, opt) } -pub fn report_batch_split_async(&self, req: &ReportBatchSplitRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.report_batch_split_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_cluster_config_opt(&self, req: &GetClusterConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_CLUSTER_CONFIG, req, opt) } -pub fn get_cluster_config(&self, req: &GetClusterConfigRequest) -> ::grpcio::Result { self.get_cluster_config_opt(req, ::grpcio::CallOption::default()) } -pub fn get_cluster_config_async_opt(&self, req: &GetClusterConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_CLUSTER_CONFIG, req, opt) } -pub fn get_cluster_config_async(&self, req: &GetClusterConfigRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_cluster_config_async_opt(req, ::grpcio::CallOption::default()) } -pub fn put_cluster_config_opt(&self, req: &PutClusterConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_PUT_CLUSTER_CONFIG, req, opt) } -pub fn put_cluster_config(&self, req: &PutClusterConfigRequest) -> ::grpcio::Result { self.put_cluster_config_opt(req, ::grpcio::CallOption::default()) } -pub fn put_cluster_config_async_opt(&self, req: &PutClusterConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_PUT_CLUSTER_CONFIG, req, opt) } -pub fn put_cluster_config_async(&self, req: &PutClusterConfigRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.put_cluster_config_async_opt(req, ::grpcio::CallOption::default()) } -pub fn scatter_region_opt(&self, req: &ScatterRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_SCATTER_REGION, req, opt) } -pub fn scatter_region(&self, req: &ScatterRegionRequest) -> ::grpcio::Result { self.scatter_region_opt(req, ::grpcio::CallOption::default()) } -pub fn scatter_region_async_opt(&self, req: &ScatterRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_SCATTER_REGION, req, opt) } -pub fn scatter_region_async(&self, req: &ScatterRegionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.scatter_region_async_opt(req, ::grpcio::CallOption::default()) } -pub fn get_gc_safe_point_opt(&self, req: &GetGcSafePointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_GC_SAFE_POINT, req, opt) } -pub fn get_gc_safe_point(&self, req: &GetGcSafePointRequest) -> ::grpcio::Result { self.get_gc_safe_point_opt(req, ::grpcio::CallOption::default()) } -pub fn get_gc_safe_point_async_opt(&self, req: &GetGcSafePointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_GC_SAFE_POINT, req, opt) } -pub fn get_gc_safe_point_async(&self, req: &GetGcSafePointRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_gc_safe_point_async_opt(req, ::grpcio::CallOption::default()) } -pub fn update_gc_safe_point_opt(&self, req: &UpdateGcSafePointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_UPDATE_GC_SAFE_POINT, req, opt) } -pub fn update_gc_safe_point(&self, req: &UpdateGcSafePointRequest) -> ::grpcio::Result { self.update_gc_safe_point_opt(req, ::grpcio::CallOption::default()) } -pub fn update_gc_safe_point_async_opt(&self, req: &UpdateGcSafePointRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_UPDATE_GC_SAFE_POINT, req, opt) } -pub fn update_gc_safe_point_async(&self, req: &UpdateGcSafePointRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.update_gc_safe_point_async_opt(req, ::grpcio::CallOption::default()) } -pub fn sync_regions_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.client.duplex_streaming(&METHOD_PD_SYNC_REGIONS, opt) } -pub fn sync_regions(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.sync_regions_opt(::grpcio::CallOption::default()) } -pub fn get_operator_opt(&self, req: &GetOperatorRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_PD_GET_OPERATOR, req, opt) } -pub fn get_operator(&self, req: &GetOperatorRequest) -> ::grpcio::Result { self.get_operator_opt(req, ::grpcio::CallOption::default()) } -pub fn get_operator_async_opt(&self, req: &GetOperatorRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_PD_GET_OPERATOR, req, opt) } -pub fn get_operator_async(&self, req: &GetOperatorRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.get_operator_async_opt(req, ::grpcio::CallOption::default()) } -pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static {self.client.spawn(f)} + pub fn new(channel: ::grpcio::Channel) -> Self { + PdClient { + client: ::grpcio::Client::new(channel), + } + } + pub fn get_members_opt( + &self, + req: &GetMembersRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_GET_MEMBERS, req, opt) + } + pub fn get_members(&self, req: &GetMembersRequest) -> ::grpcio::Result { + self.get_members_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_members_async_opt( + &self, + req: &GetMembersRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_MEMBERS, req, opt) + } + pub fn get_members_async( + &self, + req: &GetMembersRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_members_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn tso_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.client.duplex_streaming(&METHOD_PD_TSO, opt) + } + pub fn tso( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.tso_opt(::grpcio::CallOption::default()) + } + pub fn bootstrap_opt( + &self, + req: &BootstrapRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_BOOTSTRAP, req, opt) + } + pub fn bootstrap(&self, req: &BootstrapRequest) -> ::grpcio::Result { + self.bootstrap_opt(req, ::grpcio::CallOption::default()) + } + pub fn bootstrap_async_opt( + &self, + req: &BootstrapRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_PD_BOOTSTRAP, req, opt) + } + pub fn bootstrap_async( + &self, + req: &BootstrapRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.bootstrap_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn is_bootstrapped_opt( + &self, + req: &IsBootstrappedRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_IS_BOOTSTRAPPED, req, opt) + } + pub fn is_bootstrapped( + &self, + req: &IsBootstrappedRequest, + ) -> ::grpcio::Result { + self.is_bootstrapped_opt(req, ::grpcio::CallOption::default()) + } + pub fn is_bootstrapped_async_opt( + &self, + req: &IsBootstrappedRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_IS_BOOTSTRAPPED, req, opt) + } + pub fn is_bootstrapped_async( + &self, + req: &IsBootstrappedRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.is_bootstrapped_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn alloc_id_opt( + &self, + req: &AllocIdRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_ALLOC_ID, req, opt) + } + pub fn alloc_id(&self, req: &AllocIdRequest) -> ::grpcio::Result { + self.alloc_id_opt(req, ::grpcio::CallOption::default()) + } + pub fn alloc_id_async_opt( + &self, + req: &AllocIdRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_PD_ALLOC_ID, req, opt) + } + pub fn alloc_id_async( + &self, + req: &AllocIdRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.alloc_id_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_store_opt( + &self, + req: &GetStoreRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_GET_STORE, req, opt) + } + pub fn get_store(&self, req: &GetStoreRequest) -> ::grpcio::Result { + self.get_store_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_store_async_opt( + &self, + req: &GetStoreRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_PD_GET_STORE, req, opt) + } + pub fn get_store_async( + &self, + req: &GetStoreRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_store_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn put_store_opt( + &self, + req: &PutStoreRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_PUT_STORE, req, opt) + } + pub fn put_store(&self, req: &PutStoreRequest) -> ::grpcio::Result { + self.put_store_opt(req, ::grpcio::CallOption::default()) + } + pub fn put_store_async_opt( + &self, + req: &PutStoreRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_PD_PUT_STORE, req, opt) + } + pub fn put_store_async( + &self, + req: &PutStoreRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.put_store_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_all_stores_opt( + &self, + req: &GetAllStoresRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_GET_ALL_STORES, req, opt) + } + pub fn get_all_stores( + &self, + req: &GetAllStoresRequest, + ) -> ::grpcio::Result { + self.get_all_stores_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_all_stores_async_opt( + &self, + req: &GetAllStoresRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_ALL_STORES, req, opt) + } + pub fn get_all_stores_async( + &self, + req: &GetAllStoresRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_all_stores_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn store_heartbeat_opt( + &self, + req: &StoreHeartbeatRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_STORE_HEARTBEAT, req, opt) + } + pub fn store_heartbeat( + &self, + req: &StoreHeartbeatRequest, + ) -> ::grpcio::Result { + self.store_heartbeat_opt(req, ::grpcio::CallOption::default()) + } + pub fn store_heartbeat_async_opt( + &self, + req: &StoreHeartbeatRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_STORE_HEARTBEAT, req, opt) + } + pub fn store_heartbeat_async( + &self, + req: &StoreHeartbeatRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.store_heartbeat_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn region_heartbeat_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.client + .duplex_streaming(&METHOD_PD_REGION_HEARTBEAT, opt) + } + pub fn region_heartbeat( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.region_heartbeat_opt(::grpcio::CallOption::default()) + } + pub fn get_region_opt( + &self, + req: &GetRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_GET_REGION, req, opt) + } + pub fn get_region(&self, req: &GetRegionRequest) -> ::grpcio::Result { + self.get_region_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_region_async_opt( + &self, + req: &GetRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_REGION, req, opt) + } + pub fn get_region_async( + &self, + req: &GetRegionRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_region_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_prev_region_opt( + &self, + req: &GetRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_GET_PREV_REGION, req, opt) + } + pub fn get_prev_region(&self, req: &GetRegionRequest) -> ::grpcio::Result { + self.get_prev_region_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_prev_region_async_opt( + &self, + req: &GetRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_PREV_REGION, req, opt) + } + pub fn get_prev_region_async( + &self, + req: &GetRegionRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_prev_region_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_region_by_id_opt( + &self, + req: &GetRegionByIdRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_PD_GET_REGION_BY_ID, req, opt) + } + pub fn get_region_by_id( + &self, + req: &GetRegionByIdRequest, + ) -> ::grpcio::Result { + self.get_region_by_id_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_region_by_id_async_opt( + &self, + req: &GetRegionByIdRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_REGION_BY_ID, req, opt) + } + pub fn get_region_by_id_async( + &self, + req: &GetRegionByIdRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_region_by_id_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn scan_regions_opt( + &self, + req: &ScanRegionsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_SCAN_REGIONS, req, opt) + } + pub fn scan_regions(&self, req: &ScanRegionsRequest) -> ::grpcio::Result { + self.scan_regions_opt(req, ::grpcio::CallOption::default()) + } + pub fn scan_regions_async_opt( + &self, + req: &ScanRegionsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_SCAN_REGIONS, req, opt) + } + pub fn scan_regions_async( + &self, + req: &ScanRegionsRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.scan_regions_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn ask_split_opt( + &self, + req: &AskSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_ASK_SPLIT, req, opt) + } + pub fn ask_split(&self, req: &AskSplitRequest) -> ::grpcio::Result { + self.ask_split_opt(req, ::grpcio::CallOption::default()) + } + pub fn ask_split_async_opt( + &self, + req: &AskSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_PD_ASK_SPLIT, req, opt) + } + pub fn ask_split_async( + &self, + req: &AskSplitRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.ask_split_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn report_split_opt( + &self, + req: &ReportSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_REPORT_SPLIT, req, opt) + } + pub fn report_split(&self, req: &ReportSplitRequest) -> ::grpcio::Result { + self.report_split_opt(req, ::grpcio::CallOption::default()) + } + pub fn report_split_async_opt( + &self, + req: &ReportSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_REPORT_SPLIT, req, opt) + } + pub fn report_split_async( + &self, + req: &ReportSplitRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.report_split_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn ask_batch_split_opt( + &self, + req: &AskBatchSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_ASK_BATCH_SPLIT, req, opt) + } + pub fn ask_batch_split( + &self, + req: &AskBatchSplitRequest, + ) -> ::grpcio::Result { + self.ask_batch_split_opt(req, ::grpcio::CallOption::default()) + } + pub fn ask_batch_split_async_opt( + &self, + req: &AskBatchSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_ASK_BATCH_SPLIT, req, opt) + } + pub fn ask_batch_split_async( + &self, + req: &AskBatchSplitRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.ask_batch_split_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn report_batch_split_opt( + &self, + req: &ReportBatchSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_PD_REPORT_BATCH_SPLIT, req, opt) + } + pub fn report_batch_split( + &self, + req: &ReportBatchSplitRequest, + ) -> ::grpcio::Result { + self.report_batch_split_opt(req, ::grpcio::CallOption::default()) + } + pub fn report_batch_split_async_opt( + &self, + req: &ReportBatchSplitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_REPORT_BATCH_SPLIT, req, opt) + } + pub fn report_batch_split_async( + &self, + req: &ReportBatchSplitRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.report_batch_split_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_cluster_config_opt( + &self, + req: &GetClusterConfigRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_PD_GET_CLUSTER_CONFIG, req, opt) + } + pub fn get_cluster_config( + &self, + req: &GetClusterConfigRequest, + ) -> ::grpcio::Result { + self.get_cluster_config_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_cluster_config_async_opt( + &self, + req: &GetClusterConfigRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_CLUSTER_CONFIG, req, opt) + } + pub fn get_cluster_config_async( + &self, + req: &GetClusterConfigRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_cluster_config_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn put_cluster_config_opt( + &self, + req: &PutClusterConfigRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_PD_PUT_CLUSTER_CONFIG, req, opt) + } + pub fn put_cluster_config( + &self, + req: &PutClusterConfigRequest, + ) -> ::grpcio::Result { + self.put_cluster_config_opt(req, ::grpcio::CallOption::default()) + } + pub fn put_cluster_config_async_opt( + &self, + req: &PutClusterConfigRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_PUT_CLUSTER_CONFIG, req, opt) + } + pub fn put_cluster_config_async( + &self, + req: &PutClusterConfigRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.put_cluster_config_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn scatter_region_opt( + &self, + req: &ScatterRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_SCATTER_REGION, req, opt) + } + pub fn scatter_region( + &self, + req: &ScatterRegionRequest, + ) -> ::grpcio::Result { + self.scatter_region_opt(req, ::grpcio::CallOption::default()) + } + pub fn scatter_region_async_opt( + &self, + req: &ScatterRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_SCATTER_REGION, req, opt) + } + pub fn scatter_region_async( + &self, + req: &ScatterRegionRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.scatter_region_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_gc_safe_point_opt( + &self, + req: &GetGcSafePointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_PD_GET_GC_SAFE_POINT, req, opt) + } + pub fn get_gc_safe_point( + &self, + req: &GetGcSafePointRequest, + ) -> ::grpcio::Result { + self.get_gc_safe_point_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_gc_safe_point_async_opt( + &self, + req: &GetGcSafePointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_GC_SAFE_POINT, req, opt) + } + pub fn get_gc_safe_point_async( + &self, + req: &GetGcSafePointRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_gc_safe_point_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn update_gc_safe_point_opt( + &self, + req: &UpdateGcSafePointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_PD_UPDATE_GC_SAFE_POINT, req, opt) + } + pub fn update_gc_safe_point( + &self, + req: &UpdateGcSafePointRequest, + ) -> ::grpcio::Result { + self.update_gc_safe_point_opt(req, ::grpcio::CallOption::default()) + } + pub fn update_gc_safe_point_async_opt( + &self, + req: &UpdateGcSafePointRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_UPDATE_GC_SAFE_POINT, req, opt) + } + pub fn update_gc_safe_point_async( + &self, + req: &UpdateGcSafePointRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.update_gc_safe_point_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn sync_regions_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.client.duplex_streaming(&METHOD_PD_SYNC_REGIONS, opt) + } + pub fn sync_regions( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.sync_regions_opt(::grpcio::CallOption::default()) + } + pub fn get_operator_opt( + &self, + req: &GetOperatorRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_PD_GET_OPERATOR, req, opt) + } + pub fn get_operator(&self, req: &GetOperatorRequest) -> ::grpcio::Result { + self.get_operator_opt(req, ::grpcio::CallOption::default()) + } + pub fn get_operator_async_opt( + &self, + req: &GetOperatorRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_PD_GET_OPERATOR, req, opt) + } + pub fn get_operator_async( + &self, + req: &GetOperatorRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.get_operator_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) + where + F: ::futures::Future + Send + 'static, + { + self.client.spawn(f) + } } pub trait Pd { -fn get_members(&mut self, ctx: ::grpcio::RpcContext, req: GetMembersRequest, sink: ::grpcio::UnarySink); -fn tso(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); -fn bootstrap(&mut self, ctx: ::grpcio::RpcContext, req: BootstrapRequest, sink: ::grpcio::UnarySink); -fn is_bootstrapped(&mut self, ctx: ::grpcio::RpcContext, req: IsBootstrappedRequest, sink: ::grpcio::UnarySink); -fn alloc_id(&mut self, ctx: ::grpcio::RpcContext, req: AllocIdRequest, sink: ::grpcio::UnarySink); -fn get_store(&mut self, ctx: ::grpcio::RpcContext, req: GetStoreRequest, sink: ::grpcio::UnarySink); -fn put_store(&mut self, ctx: ::grpcio::RpcContext, req: PutStoreRequest, sink: ::grpcio::UnarySink); -fn get_all_stores(&mut self, ctx: ::grpcio::RpcContext, req: GetAllStoresRequest, sink: ::grpcio::UnarySink); -fn store_heartbeat(&mut self, ctx: ::grpcio::RpcContext, req: StoreHeartbeatRequest, sink: ::grpcio::UnarySink); -fn region_heartbeat(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); -fn get_region(&mut self, ctx: ::grpcio::RpcContext, req: GetRegionRequest, sink: ::grpcio::UnarySink); -fn get_prev_region(&mut self, ctx: ::grpcio::RpcContext, req: GetRegionRequest, sink: ::grpcio::UnarySink); -fn get_region_by_id(&mut self, ctx: ::grpcio::RpcContext, req: GetRegionByIdRequest, sink: ::grpcio::UnarySink); -fn scan_regions(&mut self, ctx: ::grpcio::RpcContext, req: ScanRegionsRequest, sink: ::grpcio::UnarySink); -fn ask_split(&mut self, ctx: ::grpcio::RpcContext, req: AskSplitRequest, sink: ::grpcio::UnarySink); -fn report_split(&mut self, ctx: ::grpcio::RpcContext, req: ReportSplitRequest, sink: ::grpcio::UnarySink); -fn ask_batch_split(&mut self, ctx: ::grpcio::RpcContext, req: AskBatchSplitRequest, sink: ::grpcio::UnarySink); -fn report_batch_split(&mut self, ctx: ::grpcio::RpcContext, req: ReportBatchSplitRequest, sink: ::grpcio::UnarySink); -fn get_cluster_config(&mut self, ctx: ::grpcio::RpcContext, req: GetClusterConfigRequest, sink: ::grpcio::UnarySink); -fn put_cluster_config(&mut self, ctx: ::grpcio::RpcContext, req: PutClusterConfigRequest, sink: ::grpcio::UnarySink); -fn scatter_region(&mut self, ctx: ::grpcio::RpcContext, req: ScatterRegionRequest, sink: ::grpcio::UnarySink); -fn get_gc_safe_point(&mut self, ctx: ::grpcio::RpcContext, req: GetGcSafePointRequest, sink: ::grpcio::UnarySink); -fn update_gc_safe_point(&mut self, ctx: ::grpcio::RpcContext, req: UpdateGcSafePointRequest, sink: ::grpcio::UnarySink); -fn sync_regions(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); -fn get_operator(&mut self, ctx: ::grpcio::RpcContext, req: GetOperatorRequest, sink: ::grpcio::UnarySink); + fn get_members( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetMembersRequest, + sink: ::grpcio::UnarySink, + ); + fn tso( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::DuplexSink, + ); + fn bootstrap( + &mut self, + ctx: ::grpcio::RpcContext, + req: BootstrapRequest, + sink: ::grpcio::UnarySink, + ); + fn is_bootstrapped( + &mut self, + ctx: ::grpcio::RpcContext, + req: IsBootstrappedRequest, + sink: ::grpcio::UnarySink, + ); + fn alloc_id( + &mut self, + ctx: ::grpcio::RpcContext, + req: AllocIdRequest, + sink: ::grpcio::UnarySink, + ); + fn get_store( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetStoreRequest, + sink: ::grpcio::UnarySink, + ); + fn put_store( + &mut self, + ctx: ::grpcio::RpcContext, + req: PutStoreRequest, + sink: ::grpcio::UnarySink, + ); + fn get_all_stores( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetAllStoresRequest, + sink: ::grpcio::UnarySink, + ); + fn store_heartbeat( + &mut self, + ctx: ::grpcio::RpcContext, + req: StoreHeartbeatRequest, + sink: ::grpcio::UnarySink, + ); + fn region_heartbeat( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::DuplexSink, + ); + fn get_region( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetRegionRequest, + sink: ::grpcio::UnarySink, + ); + fn get_prev_region( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetRegionRequest, + sink: ::grpcio::UnarySink, + ); + fn get_region_by_id( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetRegionByIdRequest, + sink: ::grpcio::UnarySink, + ); + fn scan_regions( + &mut self, + ctx: ::grpcio::RpcContext, + req: ScanRegionsRequest, + sink: ::grpcio::UnarySink, + ); + fn ask_split( + &mut self, + ctx: ::grpcio::RpcContext, + req: AskSplitRequest, + sink: ::grpcio::UnarySink, + ); + fn report_split( + &mut self, + ctx: ::grpcio::RpcContext, + req: ReportSplitRequest, + sink: ::grpcio::UnarySink, + ); + fn ask_batch_split( + &mut self, + ctx: ::grpcio::RpcContext, + req: AskBatchSplitRequest, + sink: ::grpcio::UnarySink, + ); + fn report_batch_split( + &mut self, + ctx: ::grpcio::RpcContext, + req: ReportBatchSplitRequest, + sink: ::grpcio::UnarySink, + ); + fn get_cluster_config( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetClusterConfigRequest, + sink: ::grpcio::UnarySink, + ); + fn put_cluster_config( + &mut self, + ctx: ::grpcio::RpcContext, + req: PutClusterConfigRequest, + sink: ::grpcio::UnarySink, + ); + fn scatter_region( + &mut self, + ctx: ::grpcio::RpcContext, + req: ScatterRegionRequest, + sink: ::grpcio::UnarySink, + ); + fn get_gc_safe_point( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetGcSafePointRequest, + sink: ::grpcio::UnarySink, + ); + fn update_gc_safe_point( + &mut self, + ctx: ::grpcio::RpcContext, + req: UpdateGcSafePointRequest, + sink: ::grpcio::UnarySink, + ); + fn sync_regions( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::DuplexSink, + ); + fn get_operator( + &mut self, + ctx: ::grpcio::RpcContext, + req: GetOperatorRequest, + sink: ::grpcio::UnarySink, + ); } pub fn create_pd(s: S) -> ::grpcio::Service { -let mut builder = ::grpcio::ServiceBuilder::new(); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_MEMBERS, move |ctx, req, resp| instance.get_members(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_duplex_streaming_handler(&METHOD_PD_TSO, move |ctx, req, resp| instance.tso(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_BOOTSTRAP, move |ctx, req, resp| instance.bootstrap(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_IS_BOOTSTRAPPED, move |ctx, req, resp| instance.is_bootstrapped(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_ALLOC_ID, move |ctx, req, resp| instance.alloc_id(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_STORE, move |ctx, req, resp| instance.get_store(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_PUT_STORE, move |ctx, req, resp| instance.put_store(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_ALL_STORES, move |ctx, req, resp| instance.get_all_stores(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_STORE_HEARTBEAT, move |ctx, req, resp| instance.store_heartbeat(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_duplex_streaming_handler(&METHOD_PD_REGION_HEARTBEAT, move |ctx, req, resp| instance.region_heartbeat(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_REGION, move |ctx, req, resp| instance.get_region(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_PREV_REGION, move |ctx, req, resp| instance.get_prev_region(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_REGION_BY_ID, move |ctx, req, resp| instance.get_region_by_id(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_SCAN_REGIONS, move |ctx, req, resp| instance.scan_regions(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_ASK_SPLIT, move |ctx, req, resp| instance.ask_split(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_REPORT_SPLIT, move |ctx, req, resp| instance.report_split(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_ASK_BATCH_SPLIT, move |ctx, req, resp| instance.ask_batch_split(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_REPORT_BATCH_SPLIT, move |ctx, req, resp| instance.report_batch_split(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_CLUSTER_CONFIG, move |ctx, req, resp| instance.get_cluster_config(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_PUT_CLUSTER_CONFIG, move |ctx, req, resp| instance.put_cluster_config(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_SCATTER_REGION, move |ctx, req, resp| instance.scatter_region(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_GC_SAFE_POINT, move |ctx, req, resp| instance.get_gc_safe_point(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_UPDATE_GC_SAFE_POINT, move |ctx, req, resp| instance.update_gc_safe_point(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_duplex_streaming_handler(&METHOD_PD_SYNC_REGIONS, move |ctx, req, resp| instance.sync_regions(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_PD_GET_OPERATOR, move |ctx, req, resp| instance.get_operator(ctx, req, resp)); -builder.build() + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_MEMBERS, move |ctx, req, resp| { + instance.get_members(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_duplex_streaming_handler(&METHOD_PD_TSO, move |ctx, req, resp| { + instance.tso(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_BOOTSTRAP, move |ctx, req, resp| { + instance.bootstrap(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_IS_BOOTSTRAPPED, move |ctx, req, resp| { + instance.is_bootstrapped(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_ALLOC_ID, move |ctx, req, resp| { + instance.alloc_id(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_STORE, move |ctx, req, resp| { + instance.get_store(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_PUT_STORE, move |ctx, req, resp| { + instance.put_store(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_ALL_STORES, move |ctx, req, resp| { + instance.get_all_stores(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_STORE_HEARTBEAT, move |ctx, req, resp| { + instance.store_heartbeat(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_duplex_streaming_handler(&METHOD_PD_REGION_HEARTBEAT, move |ctx, req, resp| { + instance.region_heartbeat(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_REGION, move |ctx, req, resp| { + instance.get_region(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_PREV_REGION, move |ctx, req, resp| { + instance.get_prev_region(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_REGION_BY_ID, move |ctx, req, resp| { + instance.get_region_by_id(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_SCAN_REGIONS, move |ctx, req, resp| { + instance.scan_regions(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_ASK_SPLIT, move |ctx, req, resp| { + instance.ask_split(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_REPORT_SPLIT, move |ctx, req, resp| { + instance.report_split(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_ASK_BATCH_SPLIT, move |ctx, req, resp| { + instance.ask_batch_split(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_REPORT_BATCH_SPLIT, move |ctx, req, resp| { + instance.report_batch_split(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_CLUSTER_CONFIG, move |ctx, req, resp| { + instance.get_cluster_config(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_PUT_CLUSTER_CONFIG, move |ctx, req, resp| { + instance.put_cluster_config(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_SCATTER_REGION, move |ctx, req, resp| { + instance.scatter_region(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_GC_SAFE_POINT, move |ctx, req, resp| { + instance.get_gc_safe_point(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_UPDATE_GC_SAFE_POINT, move |ctx, req, resp| { + instance.update_gc_safe_point(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_duplex_streaming_handler(&METHOD_PD_SYNC_REGIONS, move |ctx, req, resp| { + instance.sync_regions(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_PD_GET_OPERATOR, move |ctx, req, resp| { + instance.get_operator(ctx, req, resp) + }); + builder.build() } diff --git a/src/prost/raft_cmdpb.rs b/src/prost/raft_cmdpb.rs index edd267451..f346b4543 100644 --- a/src/prost/raft_cmdpb.rs +++ b/src/prost/raft_cmdpb.rs @@ -1,299 +1,285 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub cf: std::string::String, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResponse { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PutRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub cf: std::string::String, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct PutResponse { -} +pub struct PutResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub cf: std::string::String, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub key: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteResponse { -} +pub struct DeleteResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRangeRequest { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub cf: std::string::String, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub end_key: std::vec::Vec, - #[prost(bool, tag="4")] + #[prost(bool, tag = "4")] pub notify_only: bool, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteRangeResponse { -} +pub struct DeleteRangeResponse {} #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapRequest { -} +pub struct SnapRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrewriteRequest { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub key: std::vec::Vec, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub value: std::vec::Vec, - #[prost(bytes, tag="3")] + #[prost(bytes, tag = "3")] pub lock: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrewriteResponse { -} +pub struct PrewriteResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngestSstRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub sst: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct IngestSstResponse { -} +pub struct IngestSstResponse {} #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ReadIndexRequest { -} +pub struct ReadIndexRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadIndexResponse { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub read_index: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { - #[prost(enumeration="CmdType", tag="1")] + #[prost(enumeration = "CmdType", tag = "1")] pub cmd_type: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub get: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub put: ::std::option::Option, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub delete: ::std::option::Option, - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub snap: ::std::option::Option, - #[prost(message, optional, tag="7")] + #[prost(message, optional, tag = "7")] pub prewrite: ::std::option::Option, - #[prost(message, optional, tag="8")] + #[prost(message, optional, tag = "8")] pub delete_range: ::std::option::Option, - #[prost(message, optional, tag="9")] + #[prost(message, optional, tag = "9")] pub ingest_sst: ::std::option::Option, - #[prost(message, optional, tag="10")] + #[prost(message, optional, tag = "10")] pub read_index: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { - #[prost(enumeration="CmdType", tag="1")] + #[prost(enumeration = "CmdType", tag = "1")] pub cmd_type: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub get: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub put: ::std::option::Option, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub delete: ::std::option::Option, - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub snap: ::std::option::Option, - #[prost(message, optional, tag="7")] + #[prost(message, optional, tag = "7")] pub prewrite: ::std::option::Option, - #[prost(message, optional, tag="8")] + #[prost(message, optional, tag = "8")] pub delte_range: ::std::option::Option, - #[prost(message, optional, tag="9")] + #[prost(message, optional, tag = "9")] pub ingest_sst: ::std::option::Option, - #[prost(message, optional, tag="10")] + #[prost(message, optional, tag = "10")] pub read_index: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangePeerRequest { /// This can be only called in internal RaftStore now. - #[prost(enumeration="super::eraftpb::ConfChangeType", tag="1")] + #[prost(enumeration = "super::eraftpb::ConfChangeType", tag = "1")] pub change_type: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub peer: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangePeerResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitRequest { /// This can be only called in internal RaftStore now. /// The split_key must be in the been splitting region. - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub split_key: std::vec::Vec, - /// We split the region into two, first uses the origin + /// We split the region into two, first uses the origin /// parent region id, and the second uses the new_region_id. /// We must guarantee that the new_region_id is global unique. - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub new_region_id: u64, /// The peer ids for the new split region. - #[prost(uint64, repeated, tag="3")] + #[prost(uint64, repeated, tag = "3")] pub new_peer_ids: ::std::vec::Vec, - /// If true, right region derive the origin region_id, + /// If true, right region derive the origin region_id, /// left region use new_region_id. /// Will be ignored in batch split, use `BatchSplitRequest::right_derive` instead. - #[prost(bool, tag="4")] + #[prost(bool, tag = "4")] pub right_derive: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub left: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub right: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchSplitRequest { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub requests: ::std::vec::Vec, - /// If true, the last region derive the origin region_id, + /// If true, the last region derive the origin region_id, /// other regions use new ids. - #[prost(bool, tag="2")] + #[prost(bool, tag = "2")] pub right_derive: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchSplitResponse { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub regions: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompactLogRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub compact_index: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub compact_term: u64, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CompactLogResponse { -} +pub struct CompactLogResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransferLeaderRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub peer: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct TransferLeaderResponse { -} +pub struct TransferLeaderResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct VerifyHashRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub index: u64, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub hash: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct VerifyHashResponse { -} +pub struct VerifyHashResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrepareMergeRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub min_index: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub target: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct PrepareMergeResponse { -} +pub struct PrepareMergeResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitMergeRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub source: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub commit: u64, - #[prost(message, repeated, tag="3")] + #[prost(message, repeated, tag = "3")] pub entries: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommitMergeResponse { -} +pub struct CommitMergeResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct RollbackMergeRequest { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub commit: u64, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RollbackMergeResponse { -} +pub struct RollbackMergeResponse {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct AdminRequest { - #[prost(enumeration="AdminCmdType", tag="1")] + #[prost(enumeration = "AdminCmdType", tag = "1")] pub cmd_type: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub change_peer: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub split: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub compact_log: ::std::option::Option, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub transfer_leader: ::std::option::Option, - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub verify_hash: ::std::option::Option, - #[prost(message, optional, tag="7")] + #[prost(message, optional, tag = "7")] pub prepare_merge: ::std::option::Option, - #[prost(message, optional, tag="8")] + #[prost(message, optional, tag = "8")] pub commit_merge: ::std::option::Option, - #[prost(message, optional, tag="9")] + #[prost(message, optional, tag = "9")] pub rollback_merge: ::std::option::Option, - #[prost(message, optional, tag="10")] + #[prost(message, optional, tag = "10")] pub splits: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct AdminResponse { - #[prost(enumeration="AdminCmdType", tag="1")] + #[prost(enumeration = "AdminCmdType", tag = "1")] pub cmd_type: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub change_peer: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub split: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub compact_log: ::std::option::Option, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub transfer_leader: ::std::option::Option, - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag = "6")] pub verify_hash: ::std::option::Option, - #[prost(message, optional, tag="7")] + #[prost(message, optional, tag = "7")] pub prepare_merge: ::std::option::Option, - #[prost(message, optional, tag="8")] + #[prost(message, optional, tag = "8")] pub commit_merge: ::std::option::Option, - #[prost(message, optional, tag="9")] + #[prost(message, optional, tag = "9")] pub rollback_merge: ::std::option::Option, - #[prost(message, optional, tag="10")] + #[prost(message, optional, tag = "10")] pub splits: ::std::option::Option, } /// For get the leader of the region. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RegionLeaderRequest { -} +pub struct RegionLeaderRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionLeaderResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub leader: ::std::option::Option, } /// For getting more information of the region. /// We add some admin operations (ChangePeer, Split...) into the pb job list, -/// then pd server will peek the first one, handle it and then pop it from the job lib. +/// then pd server will peek the first one, handle it and then pop it from the job lib. /// But sometimes, the pd server may crash before popping. When another pd server /// starts and finds the job is running but not finished, it will first check whether /// the raft server already has handled this job. @@ -301,83 +287,82 @@ pub struct RegionLeaderResponse { /// Peer10, we can think this ChangePeer is finished, and can pop this job from job list /// directly. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RegionDetailRequest { -} +pub struct RegionDetailRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionDetailResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region: ::std::option::Option, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub leader: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct StatusRequest { - #[prost(enumeration="StatusCmdType", tag="1")] + #[prost(enumeration = "StatusCmdType", tag = "1")] pub cmd_type: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region_leader: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub region_detail: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct StatusResponse { - #[prost(enumeration="StatusCmdType", tag="1")] + #[prost(enumeration = "StatusCmdType", tag = "1")] pub cmd_type: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region_leader: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub region_detail: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftRequestHeader { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub peer: ::std::option::Option, /// true for read linearization - #[prost(bool, tag="3")] + #[prost(bool, tag = "3")] pub read_quorum: bool, /// 16 bytes, to distinguish request. - #[prost(bytes, tag="4")] + #[prost(bytes, tag = "4")] pub uuid: std::vec::Vec, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub region_epoch: ::std::option::Option, - #[prost(uint64, tag="6")] + #[prost(uint64, tag = "6")] pub term: u64, - #[prost(bool, tag="7")] + #[prost(bool, tag = "7")] pub sync_log: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftResponseHeader { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub error: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub uuid: std::vec::Vec, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub current_term: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftCmdRequest { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, /// We can't enclose normal requests and administrator request - /// at same time. - #[prost(message, repeated, tag="2")] + /// at same time. + #[prost(message, repeated, tag = "2")] pub requests: ::std::vec::Vec, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub admin_request: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub status_request: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftCmdResponse { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub header: ::std::option::Option, - #[prost(message, repeated, tag="2")] + #[prost(message, repeated, tag = "2")] pub responses: ::std::vec::Vec, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub admin_response: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub status_response: ::std::option::Option, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] diff --git a/src/prost/raft_serverpb.rs b/src/prost/raft_serverpb.rs index 33ce9a3b8..03b79a4dd 100644 --- a/src/prost/raft_serverpb.rs +++ b/src/prost/raft_serverpb.rs @@ -1,115 +1,114 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftMessage { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub region_id: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub from_peer: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub to_peer: ::std::option::Option, - #[prost(message, optional, tag="4")] + #[prost(message, optional, tag = "4")] pub message: ::std::option::Option, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub region_epoch: ::std::option::Option, /// true means to_peer is a tombstone peer and it should remove itself. - #[prost(bool, tag="6")] + #[prost(bool, tag = "6")] pub is_tombstone: bool, /// Region key range [start_key, end_key). - #[prost(bytes, tag="7")] + #[prost(bytes, tag = "7")] pub start_key: std::vec::Vec, - #[prost(bytes, tag="8")] + #[prost(bytes, tag = "8")] pub end_key: std::vec::Vec, /// If it has value, to_peer should be removed if merge is never going to complete. - #[prost(message, optional, tag="9")] + #[prost(message, optional, tag = "9")] pub merge_target: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftTruncatedState { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub index: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub term: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotCfFile { - #[prost(string, tag="1")] + #[prost(string, tag = "1")] pub cf: std::string::String, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub size: u64, - #[prost(uint32, tag="3")] + #[prost(uint32, tag = "3")] pub checksum: u32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotMeta { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub cf_files: ::std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotChunk { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub message: ::std::option::Option, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub data: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Done { -} +pub struct Done {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyValue { - #[prost(bytes, tag="1")] + #[prost(bytes, tag = "1")] pub key: std::vec::Vec, - #[prost(bytes, tag="2")] + #[prost(bytes, tag = "2")] pub value: std::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftSnapshotData { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub region: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub file_size: u64, - #[prost(message, repeated, tag="3")] + #[prost(message, repeated, tag = "3")] pub data: ::std::vec::Vec, - #[prost(uint64, tag="4")] + #[prost(uint64, tag = "4")] pub version: u64, - #[prost(message, optional, tag="5")] + #[prost(message, optional, tag = "5")] pub meta: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreIdent { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub cluster_id: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub store_id: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftLocalState { - #[prost(message, optional, tag="1")] + #[prost(message, optional, tag = "1")] pub hard_state: ::std::option::Option, - #[prost(uint64, tag="2")] + #[prost(uint64, tag = "2")] pub last_index: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftApplyState { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub applied_index: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub truncated_state: ::std::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MergeState { - #[prost(uint64, tag="1")] + #[prost(uint64, tag = "1")] pub min_index: u64, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub target: ::std::option::Option, - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub commit: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionLocalState { - #[prost(enumeration="PeerState", tag="1")] + #[prost(enumeration = "PeerState", tag = "1")] pub state: i32, - #[prost(message, optional, tag="2")] + #[prost(message, optional, tag = "2")] pub region: ::std::option::Option, - #[prost(message, optional, tag="3")] + #[prost(message, optional, tag = "3")] pub merge_state: ::std::option::Option, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] diff --git a/src/prost/rustproto.rs b/src/prost/rustproto.rs index e69de29bb..8b1378917 100644 --- a/src/prost/rustproto.rs +++ b/src/prost/rustproto.rs @@ -0,0 +1 @@ + diff --git a/src/prost/tikvpb.rs b/src/prost/tikvpb.rs index 377965d66..584ef2b28 100644 --- a/src/prost/tikvpb.rs +++ b/src/prost/tikvpb.rs @@ -1,416 +1,1907 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchCommandsRequest { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub requests: ::std::vec::Vec, - #[prost(uint64, repeated, tag="2")] + #[prost(uint64, repeated, tag = "2")] pub request_ids: ::std::vec::Vec, } pub mod batch_commands_request { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { - #[prost(oneof="request::Cmd", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24")] + #[prost( + oneof = "request::Cmd", + tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24" + )] pub cmd: ::std::option::Option, } pub mod request { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Cmd { - #[prost(message, tag="1")] + #[prost(message, tag = "1")] Get(super::super::super::kvrpcpb::GetRequest), - #[prost(message, tag="2")] + #[prost(message, tag = "2")] Scan(super::super::super::kvrpcpb::ScanRequest), - #[prost(message, tag="3")] + #[prost(message, tag = "3")] Prewrite(super::super::super::kvrpcpb::PrewriteRequest), - #[prost(message, tag="4")] + #[prost(message, tag = "4")] Commit(super::super::super::kvrpcpb::CommitRequest), - #[prost(message, tag="5")] + #[prost(message, tag = "5")] Import(super::super::super::kvrpcpb::ImportRequest), - #[prost(message, tag="6")] + #[prost(message, tag = "6")] Cleanup(super::super::super::kvrpcpb::CleanupRequest), - #[prost(message, tag="7")] + #[prost(message, tag = "7")] BatchGet(super::super::super::kvrpcpb::BatchGetRequest), - #[prost(message, tag="8")] + #[prost(message, tag = "8")] BatchRollback(super::super::super::kvrpcpb::BatchRollbackRequest), - #[prost(message, tag="9")] + #[prost(message, tag = "9")] ScanLock(super::super::super::kvrpcpb::ScanLockRequest), - #[prost(message, tag="10")] + #[prost(message, tag = "10")] ResolveLock(super::super::super::kvrpcpb::ResolveLockRequest), - #[prost(message, tag="11")] + #[prost(message, tag = "11")] Gc(super::super::super::kvrpcpb::GcRequest), - #[prost(message, tag="12")] + #[prost(message, tag = "12")] DeleteRange(super::super::super::kvrpcpb::DeleteRangeRequest), - #[prost(message, tag="13")] + #[prost(message, tag = "13")] RawGet(super::super::super::kvrpcpb::RawGetRequest), - #[prost(message, tag="14")] + #[prost(message, tag = "14")] RawBatchGet(super::super::super::kvrpcpb::RawBatchGetRequest), - #[prost(message, tag="15")] + #[prost(message, tag = "15")] RawPut(super::super::super::kvrpcpb::RawPutRequest), - #[prost(message, tag="16")] + #[prost(message, tag = "16")] RawBatchPut(super::super::super::kvrpcpb::RawBatchPutRequest), - #[prost(message, tag="17")] + #[prost(message, tag = "17")] RawDelete(super::super::super::kvrpcpb::RawDeleteRequest), - #[prost(message, tag="18")] + #[prost(message, tag = "18")] RawBatchDelete(super::super::super::kvrpcpb::RawBatchDeleteRequest), - #[prost(message, tag="19")] + #[prost(message, tag = "19")] RawScan(super::super::super::kvrpcpb::RawScanRequest), - #[prost(message, tag="20")] + #[prost(message, tag = "20")] RawDeleteRange(super::super::super::kvrpcpb::RawDeleteRangeRequest), - #[prost(message, tag="21")] + #[prost(message, tag = "21")] RawBatchScan(super::super::super::kvrpcpb::RawBatchScanRequest), - #[prost(message, tag="22")] + #[prost(message, tag = "22")] Coprocessor(super::super::super::coprocessor::Request), - #[prost(message, tag="23")] + #[prost(message, tag = "23")] PessimisticLock(super::super::super::kvrpcpb::PessimisticLockRequest), - #[prost(message, tag="24")] + #[prost(message, tag = "24")] PessimisticRollback(super::super::super::kvrpcpb::PessimisticRollbackRequest), } } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchCommandsResponse { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub responses: ::std::vec::Vec, - #[prost(uint64, repeated, tag="2")] + #[prost(uint64, repeated, tag = "2")] pub request_ids: ::std::vec::Vec, /// 280 means TiKV gRPC cpu usage is 280%. - #[prost(uint64, tag="3")] + #[prost(uint64, tag = "3")] pub transport_layer_load: u64, } pub mod batch_commands_response { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { - #[prost(oneof="response::Cmd", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24")] + #[prost( + oneof = "response::Cmd", + tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24" + )] pub cmd: ::std::option::Option, } pub mod response { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Cmd { - #[prost(message, tag="1")] + #[prost(message, tag = "1")] Get(super::super::super::kvrpcpb::GetResponse), - #[prost(message, tag="2")] + #[prost(message, tag = "2")] Scan(super::super::super::kvrpcpb::ScanResponse), - #[prost(message, tag="3")] + #[prost(message, tag = "3")] Prewrite(super::super::super::kvrpcpb::PrewriteResponse), - #[prost(message, tag="4")] + #[prost(message, tag = "4")] Commit(super::super::super::kvrpcpb::CommitResponse), - #[prost(message, tag="5")] + #[prost(message, tag = "5")] Import(super::super::super::kvrpcpb::ImportResponse), - #[prost(message, tag="6")] + #[prost(message, tag = "6")] Cleanup(super::super::super::kvrpcpb::CleanupResponse), - #[prost(message, tag="7")] + #[prost(message, tag = "7")] BatchGet(super::super::super::kvrpcpb::BatchGetResponse), - #[prost(message, tag="8")] + #[prost(message, tag = "8")] BatchRollback(super::super::super::kvrpcpb::BatchRollbackResponse), - #[prost(message, tag="9")] + #[prost(message, tag = "9")] ScanLock(super::super::super::kvrpcpb::ScanLockResponse), - #[prost(message, tag="10")] + #[prost(message, tag = "10")] ResolveLock(super::super::super::kvrpcpb::ResolveLockResponse), - #[prost(message, tag="11")] + #[prost(message, tag = "11")] Gc(super::super::super::kvrpcpb::GcResponse), - #[prost(message, tag="12")] + #[prost(message, tag = "12")] DeleteRange(super::super::super::kvrpcpb::DeleteRangeResponse), - #[prost(message, tag="13")] + #[prost(message, tag = "13")] RawGet(super::super::super::kvrpcpb::RawGetResponse), - #[prost(message, tag="14")] + #[prost(message, tag = "14")] RawBatchGet(super::super::super::kvrpcpb::RawBatchGetResponse), - #[prost(message, tag="15")] + #[prost(message, tag = "15")] RawPut(super::super::super::kvrpcpb::RawPutResponse), - #[prost(message, tag="16")] + #[prost(message, tag = "16")] RawBatchPut(super::super::super::kvrpcpb::RawBatchPutResponse), - #[prost(message, tag="17")] + #[prost(message, tag = "17")] RawDelete(super::super::super::kvrpcpb::RawDeleteResponse), - #[prost(message, tag="18")] + #[prost(message, tag = "18")] RawBatchDelete(super::super::super::kvrpcpb::RawBatchDeleteResponse), - #[prost(message, tag="19")] + #[prost(message, tag = "19")] RawScan(super::super::super::kvrpcpb::RawScanResponse), - #[prost(message, tag="20")] + #[prost(message, tag = "20")] RawDeleteRange(super::super::super::kvrpcpb::RawDeleteRangeResponse), - #[prost(message, tag="21")] + #[prost(message, tag = "21")] RawBatchScan(super::super::super::kvrpcpb::RawBatchScanResponse), - #[prost(message, tag="22")] + #[prost(message, tag = "22")] Coprocessor(super::super::super::coprocessor::Response), - #[prost(message, tag="23")] + #[prost(message, tag = "23")] PessimisticLock(super::super::super::kvrpcpb::PessimisticLockResponse), - #[prost(message, tag="24")] + #[prost(message, tag = "24")] PessimisticRollback(super::super::super::kvrpcpb::PessimisticRollbackResponse), } } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchRaftMessage { - #[prost(message, repeated, tag="1")] + #[prost(message, repeated, tag = "1")] pub msgs: ::std::vec::Vec, } -const METHOD_TIKV_KV_GET: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvGet", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_SCAN: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvScan", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_PREWRITE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvPrewrite", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_PESSIMISTIC_LOCK: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvPessimisticLock", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KVPessimisticRollback", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_COMMIT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvCommit", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_IMPORT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvImport", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_CLEANUP: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvCleanup", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_BATCH_GET: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvBatchGet", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_BATCH_ROLLBACK: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvBatchRollback", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_SCAN_LOCK: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvScanLock", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_RESOLVE_LOCK: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvResolveLock", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_GC: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvGC", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_KV_DELETE_RANGE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/KvDeleteRange", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_GET: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawGet", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_BATCH_GET: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawBatchGet", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_PUT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawPut", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_BATCH_PUT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawBatchPut", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_DELETE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawDelete", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_BATCH_DELETE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawBatchDelete", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_SCAN: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawScan", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_DELETE_RANGE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawDeleteRange", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAW_BATCH_SCAN: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/RawBatchScan", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_UNSAFE_DESTROY_RANGE: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/UnsafeDestroyRange", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_COPROCESSOR: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/Coprocessor", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_COPROCESSOR_STREAM: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ServerStreaming, name: "/tikvpb.Tikv/CoprocessorStream", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_RAFT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ClientStreaming, name: "/tikvpb.Tikv/Raft", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_BATCH_RAFT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ClientStreaming, name: "/tikvpb.Tikv/BatchRaft", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_SNAPSHOT: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::ClientStreaming, name: "/tikvpb.Tikv/Snapshot", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_SPLIT_REGION: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/SplitRegion", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_READ_INDEX: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/ReadIndex", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_MVCC_GET_BY_KEY: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/MvccGetByKey", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_MVCC_GET_BY_START_TS: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Unary, name: "/tikvpb.Tikv/MvccGetByStartTs", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; -const METHOD_TIKV_BATCH_COMMANDS: ::grpcio::Method = ::grpcio::Method{ty: ::grpcio::MethodType::Duplex, name: "/tikvpb.Tikv/BatchCommands", req_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, }; +const METHOD_TIKV_KV_GET: ::grpcio::Method< + super::kvrpcpb::GetRequest, + super::kvrpcpb::GetResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvGet", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_SCAN: ::grpcio::Method< + super::kvrpcpb::ScanRequest, + super::kvrpcpb::ScanResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvScan", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_PREWRITE: ::grpcio::Method< + super::kvrpcpb::PrewriteRequest, + super::kvrpcpb::PrewriteResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvPrewrite", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_PESSIMISTIC_LOCK: ::grpcio::Method< + super::kvrpcpb::PessimisticLockRequest, + super::kvrpcpb::PessimisticLockResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvPessimisticLock", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK: ::grpcio::Method< + super::kvrpcpb::PessimisticRollbackRequest, + super::kvrpcpb::PessimisticRollbackResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KVPessimisticRollback", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_COMMIT: ::grpcio::Method< + super::kvrpcpb::CommitRequest, + super::kvrpcpb::CommitResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvCommit", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_IMPORT: ::grpcio::Method< + super::kvrpcpb::ImportRequest, + super::kvrpcpb::ImportResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvImport", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_CLEANUP: ::grpcio::Method< + super::kvrpcpb::CleanupRequest, + super::kvrpcpb::CleanupResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvCleanup", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_BATCH_GET: ::grpcio::Method< + super::kvrpcpb::BatchGetRequest, + super::kvrpcpb::BatchGetResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvBatchGet", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_BATCH_ROLLBACK: ::grpcio::Method< + super::kvrpcpb::BatchRollbackRequest, + super::kvrpcpb::BatchRollbackResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvBatchRollback", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_SCAN_LOCK: ::grpcio::Method< + super::kvrpcpb::ScanLockRequest, + super::kvrpcpb::ScanLockResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvScanLock", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_RESOLVE_LOCK: ::grpcio::Method< + super::kvrpcpb::ResolveLockRequest, + super::kvrpcpb::ResolveLockResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvResolveLock", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_KV_GC: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvGC", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_TIKV_KV_DELETE_RANGE: ::grpcio::Method< + super::kvrpcpb::DeleteRangeRequest, + super::kvrpcpb::DeleteRangeResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/KvDeleteRange", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_GET: ::grpcio::Method< + super::kvrpcpb::RawGetRequest, + super::kvrpcpb::RawGetResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawGet", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_BATCH_GET: ::grpcio::Method< + super::kvrpcpb::RawBatchGetRequest, + super::kvrpcpb::RawBatchGetResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawBatchGet", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_PUT: ::grpcio::Method< + super::kvrpcpb::RawPutRequest, + super::kvrpcpb::RawPutResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawPut", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_BATCH_PUT: ::grpcio::Method< + super::kvrpcpb::RawBatchPutRequest, + super::kvrpcpb::RawBatchPutResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawBatchPut", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_DELETE: ::grpcio::Method< + super::kvrpcpb::RawDeleteRequest, + super::kvrpcpb::RawDeleteResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawDelete", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_BATCH_DELETE: ::grpcio::Method< + super::kvrpcpb::RawBatchDeleteRequest, + super::kvrpcpb::RawBatchDeleteResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawBatchDelete", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_SCAN: ::grpcio::Method< + super::kvrpcpb::RawScanRequest, + super::kvrpcpb::RawScanResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawScan", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_DELETE_RANGE: ::grpcio::Method< + super::kvrpcpb::RawDeleteRangeRequest, + super::kvrpcpb::RawDeleteRangeResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawDeleteRange", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAW_BATCH_SCAN: ::grpcio::Method< + super::kvrpcpb::RawBatchScanRequest, + super::kvrpcpb::RawBatchScanResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/RawBatchScan", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_UNSAFE_DESTROY_RANGE: ::grpcio::Method< + super::kvrpcpb::UnsafeDestroyRangeRequest, + super::kvrpcpb::UnsafeDestroyRangeResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/UnsafeDestroyRange", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_COPROCESSOR: ::grpcio::Method< + super::coprocessor::Request, + super::coprocessor::Response, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/Coprocessor", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_COPROCESSOR_STREAM: ::grpcio::Method< + super::coprocessor::Request, + super::coprocessor::Response, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::ServerStreaming, + name: "/tikvpb.Tikv/CoprocessorStream", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_RAFT: ::grpcio::Method< + super::raft_serverpb::RaftMessage, + super::raft_serverpb::Done, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::ClientStreaming, + name: "/tikvpb.Tikv/Raft", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_BATCH_RAFT: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::ClientStreaming, + name: "/tikvpb.Tikv/BatchRaft", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; +const METHOD_TIKV_SNAPSHOT: ::grpcio::Method< + super::raft_serverpb::SnapshotChunk, + super::raft_serverpb::Done, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::ClientStreaming, + name: "/tikvpb.Tikv/Snapshot", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_SPLIT_REGION: ::grpcio::Method< + super::kvrpcpb::SplitRegionRequest, + super::kvrpcpb::SplitRegionResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/SplitRegion", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_READ_INDEX: ::grpcio::Method< + super::kvrpcpb::ReadIndexRequest, + super::kvrpcpb::ReadIndexResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/ReadIndex", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_MVCC_GET_BY_KEY: ::grpcio::Method< + super::kvrpcpb::MvccGetByKeyRequest, + super::kvrpcpb::MvccGetByKeyResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/MvccGetByKey", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_MVCC_GET_BY_START_TS: ::grpcio::Method< + super::kvrpcpb::MvccGetByStartTsRequest, + super::kvrpcpb::MvccGetByStartTsResponse, +> = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/tikvpb.Tikv/MvccGetByStartTs", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, +}; +const METHOD_TIKV_BATCH_COMMANDS: ::grpcio::Method = + ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/tikvpb.Tikv/BatchCommands", + req_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + resp_mar: ::grpcio::Marshaller { + ser: ::grpcio::pr_ser, + de: ::grpcio::pr_de, + }, + }; #[derive(Clone)] -pub struct TikvClient { client: ::grpcio::Client } +pub struct TikvClient { + client: ::grpcio::Client, +} impl TikvClient { -pub fn new(channel: ::grpcio::Channel) -> Self { TikvClient { client: ::grpcio::Client::new(channel) }} -pub fn kv_get_opt(&self, req: &super::kvrpcpb::GetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_GET, req, opt) } -pub fn kv_get(&self, req: &super::kvrpcpb::GetRequest) -> ::grpcio::Result { self.kv_get_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_get_async_opt(&self, req: &super::kvrpcpb::GetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_GET, req, opt) } -pub fn kv_get_async(&self, req: &super::kvrpcpb::GetRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_get_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_scan_opt(&self, req: &super::kvrpcpb::ScanRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_SCAN, req, opt) } -pub fn kv_scan(&self, req: &super::kvrpcpb::ScanRequest) -> ::grpcio::Result { self.kv_scan_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_scan_async_opt(&self, req: &super::kvrpcpb::ScanRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_SCAN, req, opt) } -pub fn kv_scan_async(&self, req: &super::kvrpcpb::ScanRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_scan_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_prewrite_opt(&self, req: &super::kvrpcpb::PrewriteRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_PREWRITE, req, opt) } -pub fn kv_prewrite(&self, req: &super::kvrpcpb::PrewriteRequest) -> ::grpcio::Result { self.kv_prewrite_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_prewrite_async_opt(&self, req: &super::kvrpcpb::PrewriteRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_PREWRITE, req, opt) } -pub fn kv_prewrite_async(&self, req: &super::kvrpcpb::PrewriteRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_prewrite_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_pessimistic_lock_opt(&self, req: &super::kvrpcpb::PessimisticLockRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_PESSIMISTIC_LOCK, req, opt) } -pub fn kv_pessimistic_lock(&self, req: &super::kvrpcpb::PessimisticLockRequest) -> ::grpcio::Result { self.kv_pessimistic_lock_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_pessimistic_lock_async_opt(&self, req: &super::kvrpcpb::PessimisticLockRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_PESSIMISTIC_LOCK, req, opt) } -pub fn kv_pessimistic_lock_async(&self, req: &super::kvrpcpb::PessimisticLockRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_pessimistic_lock_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_pessimistic_rollback_opt(&self, req: &super::kvrpcpb::PessimisticRollbackRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK, req, opt) } -pub fn kv_pessimistic_rollback(&self, req: &super::kvrpcpb::PessimisticRollbackRequest) -> ::grpcio::Result { self.kv_pessimistic_rollback_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_pessimistic_rollback_async_opt(&self, req: &super::kvrpcpb::PessimisticRollbackRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK, req, opt) } -pub fn kv_pessimistic_rollback_async(&self, req: &super::kvrpcpb::PessimisticRollbackRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_pessimistic_rollback_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_commit_opt(&self, req: &super::kvrpcpb::CommitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_COMMIT, req, opt) } -pub fn kv_commit(&self, req: &super::kvrpcpb::CommitRequest) -> ::grpcio::Result { self.kv_commit_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_commit_async_opt(&self, req: &super::kvrpcpb::CommitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_COMMIT, req, opt) } -pub fn kv_commit_async(&self, req: &super::kvrpcpb::CommitRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_commit_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_import_opt(&self, req: &super::kvrpcpb::ImportRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_IMPORT, req, opt) } -pub fn kv_import(&self, req: &super::kvrpcpb::ImportRequest) -> ::grpcio::Result { self.kv_import_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_import_async_opt(&self, req: &super::kvrpcpb::ImportRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_IMPORT, req, opt) } -pub fn kv_import_async(&self, req: &super::kvrpcpb::ImportRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_import_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_cleanup_opt(&self, req: &super::kvrpcpb::CleanupRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_CLEANUP, req, opt) } -pub fn kv_cleanup(&self, req: &super::kvrpcpb::CleanupRequest) -> ::grpcio::Result { self.kv_cleanup_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_cleanup_async_opt(&self, req: &super::kvrpcpb::CleanupRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_CLEANUP, req, opt) } -pub fn kv_cleanup_async(&self, req: &super::kvrpcpb::CleanupRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_cleanup_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_batch_get_opt(&self, req: &super::kvrpcpb::BatchGetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_BATCH_GET, req, opt) } -pub fn kv_batch_get(&self, req: &super::kvrpcpb::BatchGetRequest) -> ::grpcio::Result { self.kv_batch_get_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_batch_get_async_opt(&self, req: &super::kvrpcpb::BatchGetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_BATCH_GET, req, opt) } -pub fn kv_batch_get_async(&self, req: &super::kvrpcpb::BatchGetRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_batch_get_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_batch_rollback_opt(&self, req: &super::kvrpcpb::BatchRollbackRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_BATCH_ROLLBACK, req, opt) } -pub fn kv_batch_rollback(&self, req: &super::kvrpcpb::BatchRollbackRequest) -> ::grpcio::Result { self.kv_batch_rollback_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_batch_rollback_async_opt(&self, req: &super::kvrpcpb::BatchRollbackRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_BATCH_ROLLBACK, req, opt) } -pub fn kv_batch_rollback_async(&self, req: &super::kvrpcpb::BatchRollbackRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_batch_rollback_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_scan_lock_opt(&self, req: &super::kvrpcpb::ScanLockRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_SCAN_LOCK, req, opt) } -pub fn kv_scan_lock(&self, req: &super::kvrpcpb::ScanLockRequest) -> ::grpcio::Result { self.kv_scan_lock_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_scan_lock_async_opt(&self, req: &super::kvrpcpb::ScanLockRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_SCAN_LOCK, req, opt) } -pub fn kv_scan_lock_async(&self, req: &super::kvrpcpb::ScanLockRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_scan_lock_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_resolve_lock_opt(&self, req: &super::kvrpcpb::ResolveLockRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_RESOLVE_LOCK, req, opt) } -pub fn kv_resolve_lock(&self, req: &super::kvrpcpb::ResolveLockRequest) -> ::grpcio::Result { self.kv_resolve_lock_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_resolve_lock_async_opt(&self, req: &super::kvrpcpb::ResolveLockRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_RESOLVE_LOCK, req, opt) } -pub fn kv_resolve_lock_async(&self, req: &super::kvrpcpb::ResolveLockRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_resolve_lock_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_gc_opt(&self, req: &super::kvrpcpb::GcRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_GC, req, opt) } -pub fn kv_gc(&self, req: &super::kvrpcpb::GcRequest) -> ::grpcio::Result { self.kv_gc_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_gc_async_opt(&self, req: &super::kvrpcpb::GcRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_GC, req, opt) } -pub fn kv_gc_async(&self, req: &super::kvrpcpb::GcRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_gc_async_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_delete_range_opt(&self, req: &super::kvrpcpb::DeleteRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_KV_DELETE_RANGE, req, opt) } -pub fn kv_delete_range(&self, req: &super::kvrpcpb::DeleteRangeRequest) -> ::grpcio::Result { self.kv_delete_range_opt(req, ::grpcio::CallOption::default()) } -pub fn kv_delete_range_async_opt(&self, req: &super::kvrpcpb::DeleteRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_KV_DELETE_RANGE, req, opt) } -pub fn kv_delete_range_async(&self, req: &super::kvrpcpb::DeleteRangeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.kv_delete_range_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_get_opt(&self, req: &super::kvrpcpb::RawGetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_GET, req, opt) } -pub fn raw_get(&self, req: &super::kvrpcpb::RawGetRequest) -> ::grpcio::Result { self.raw_get_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_get_async_opt(&self, req: &super::kvrpcpb::RawGetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_GET, req, opt) } -pub fn raw_get_async(&self, req: &super::kvrpcpb::RawGetRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_get_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_get_opt(&self, req: &super::kvrpcpb::RawBatchGetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_BATCH_GET, req, opt) } -pub fn raw_batch_get(&self, req: &super::kvrpcpb::RawBatchGetRequest) -> ::grpcio::Result { self.raw_batch_get_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_get_async_opt(&self, req: &super::kvrpcpb::RawBatchGetRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_BATCH_GET, req, opt) } -pub fn raw_batch_get_async(&self, req: &super::kvrpcpb::RawBatchGetRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_batch_get_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_put_opt(&self, req: &super::kvrpcpb::RawPutRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_PUT, req, opt) } -pub fn raw_put(&self, req: &super::kvrpcpb::RawPutRequest) -> ::grpcio::Result { self.raw_put_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_put_async_opt(&self, req: &super::kvrpcpb::RawPutRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_PUT, req, opt) } -pub fn raw_put_async(&self, req: &super::kvrpcpb::RawPutRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_put_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_put_opt(&self, req: &super::kvrpcpb::RawBatchPutRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_BATCH_PUT, req, opt) } -pub fn raw_batch_put(&self, req: &super::kvrpcpb::RawBatchPutRequest) -> ::grpcio::Result { self.raw_batch_put_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_put_async_opt(&self, req: &super::kvrpcpb::RawBatchPutRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_BATCH_PUT, req, opt) } -pub fn raw_batch_put_async(&self, req: &super::kvrpcpb::RawBatchPutRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_batch_put_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_delete_opt(&self, req: &super::kvrpcpb::RawDeleteRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_DELETE, req, opt) } -pub fn raw_delete(&self, req: &super::kvrpcpb::RawDeleteRequest) -> ::grpcio::Result { self.raw_delete_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_delete_async_opt(&self, req: &super::kvrpcpb::RawDeleteRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_DELETE, req, opt) } -pub fn raw_delete_async(&self, req: &super::kvrpcpb::RawDeleteRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_delete_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_delete_opt(&self, req: &super::kvrpcpb::RawBatchDeleteRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_BATCH_DELETE, req, opt) } -pub fn raw_batch_delete(&self, req: &super::kvrpcpb::RawBatchDeleteRequest) -> ::grpcio::Result { self.raw_batch_delete_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_delete_async_opt(&self, req: &super::kvrpcpb::RawBatchDeleteRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_BATCH_DELETE, req, opt) } -pub fn raw_batch_delete_async(&self, req: &super::kvrpcpb::RawBatchDeleteRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_batch_delete_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_scan_opt(&self, req: &super::kvrpcpb::RawScanRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_SCAN, req, opt) } -pub fn raw_scan(&self, req: &super::kvrpcpb::RawScanRequest) -> ::grpcio::Result { self.raw_scan_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_scan_async_opt(&self, req: &super::kvrpcpb::RawScanRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_SCAN, req, opt) } -pub fn raw_scan_async(&self, req: &super::kvrpcpb::RawScanRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_scan_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_delete_range_opt(&self, req: &super::kvrpcpb::RawDeleteRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_DELETE_RANGE, req, opt) } -pub fn raw_delete_range(&self, req: &super::kvrpcpb::RawDeleteRangeRequest) -> ::grpcio::Result { self.raw_delete_range_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_delete_range_async_opt(&self, req: &super::kvrpcpb::RawDeleteRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_DELETE_RANGE, req, opt) } -pub fn raw_delete_range_async(&self, req: &super::kvrpcpb::RawDeleteRangeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_delete_range_async_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_scan_opt(&self, req: &super::kvrpcpb::RawBatchScanRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_RAW_BATCH_SCAN, req, opt) } -pub fn raw_batch_scan(&self, req: &super::kvrpcpb::RawBatchScanRequest) -> ::grpcio::Result { self.raw_batch_scan_opt(req, ::grpcio::CallOption::default()) } -pub fn raw_batch_scan_async_opt(&self, req: &super::kvrpcpb::RawBatchScanRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_RAW_BATCH_SCAN, req, opt) } -pub fn raw_batch_scan_async(&self, req: &super::kvrpcpb::RawBatchScanRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.raw_batch_scan_async_opt(req, ::grpcio::CallOption::default()) } -pub fn unsafe_destroy_range_opt(&self, req: &super::kvrpcpb::UnsafeDestroyRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_UNSAFE_DESTROY_RANGE, req, opt) } -pub fn unsafe_destroy_range(&self, req: &super::kvrpcpb::UnsafeDestroyRangeRequest) -> ::grpcio::Result { self.unsafe_destroy_range_opt(req, ::grpcio::CallOption::default()) } -pub fn unsafe_destroy_range_async_opt(&self, req: &super::kvrpcpb::UnsafeDestroyRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_UNSAFE_DESTROY_RANGE, req, opt) } -pub fn unsafe_destroy_range_async(&self, req: &super::kvrpcpb::UnsafeDestroyRangeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.unsafe_destroy_range_async_opt(req, ::grpcio::CallOption::default()) } -pub fn coprocessor_opt(&self, req: &super::coprocessor::Request, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_COPROCESSOR, req, opt) } -pub fn coprocessor(&self, req: &super::coprocessor::Request) -> ::grpcio::Result { self.coprocessor_opt(req, ::grpcio::CallOption::default()) } -pub fn coprocessor_async_opt(&self, req: &super::coprocessor::Request, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_COPROCESSOR, req, opt) } -pub fn coprocessor_async(&self, req: &super::coprocessor::Request) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.coprocessor_async_opt(req, ::grpcio::CallOption::default()) } -pub fn coprocessor_stream_opt(&self, req: &super::coprocessor::Request, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver,> { self.client.server_streaming(&METHOD_TIKV_COPROCESSOR_STREAM, req, opt) } -pub fn coprocessor_stream(&self, req: &super::coprocessor::Request) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver,> { self.coprocessor_stream_opt(req, ::grpcio::CallOption::default()) } -pub fn raft_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.client.client_streaming(&METHOD_TIKV_RAFT, opt) } -pub fn raft(&self) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.raft_opt(::grpcio::CallOption::default()) } -pub fn batch_raft_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.client.client_streaming(&METHOD_TIKV_BATCH_RAFT, opt) } -pub fn batch_raft(&self) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.batch_raft_opt(::grpcio::CallOption::default()) } -pub fn snapshot_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.client.client_streaming(&METHOD_TIKV_SNAPSHOT, opt) } -pub fn snapshot(&self) -> ::grpcio::Result<(::grpcio::ClientCStreamSender,::grpcio::ClientCStreamReceiver,)> { self.snapshot_opt(::grpcio::CallOption::default()) } -pub fn split_region_opt(&self, req: &super::kvrpcpb::SplitRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_SPLIT_REGION, req, opt) } -pub fn split_region(&self, req: &super::kvrpcpb::SplitRegionRequest) -> ::grpcio::Result { self.split_region_opt(req, ::grpcio::CallOption::default()) } -pub fn split_region_async_opt(&self, req: &super::kvrpcpb::SplitRegionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_SPLIT_REGION, req, opt) } -pub fn split_region_async(&self, req: &super::kvrpcpb::SplitRegionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.split_region_async_opt(req, ::grpcio::CallOption::default()) } -pub fn read_index_opt(&self, req: &super::kvrpcpb::ReadIndexRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_READ_INDEX, req, opt) } -pub fn read_index(&self, req: &super::kvrpcpb::ReadIndexRequest) -> ::grpcio::Result { self.read_index_opt(req, ::grpcio::CallOption::default()) } -pub fn read_index_async_opt(&self, req: &super::kvrpcpb::ReadIndexRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_READ_INDEX, req, opt) } -pub fn read_index_async(&self, req: &super::kvrpcpb::ReadIndexRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.read_index_async_opt(req, ::grpcio::CallOption::default()) } -pub fn mvcc_get_by_key_opt(&self, req: &super::kvrpcpb::MvccGetByKeyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_MVCC_GET_BY_KEY, req, opt) } -pub fn mvcc_get_by_key(&self, req: &super::kvrpcpb::MvccGetByKeyRequest) -> ::grpcio::Result { self.mvcc_get_by_key_opt(req, ::grpcio::CallOption::default()) } -pub fn mvcc_get_by_key_async_opt(&self, req: &super::kvrpcpb::MvccGetByKeyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_MVCC_GET_BY_KEY, req, opt) } -pub fn mvcc_get_by_key_async(&self, req: &super::kvrpcpb::MvccGetByKeyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.mvcc_get_by_key_async_opt(req, ::grpcio::CallOption::default()) } -pub fn mvcc_get_by_start_ts_opt(&self, req: &super::kvrpcpb::MvccGetByStartTsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { self.client.unary_call(&METHOD_TIKV_MVCC_GET_BY_START_TS, req, opt) } -pub fn mvcc_get_by_start_ts(&self, req: &super::kvrpcpb::MvccGetByStartTsRequest) -> ::grpcio::Result { self.mvcc_get_by_start_ts_opt(req, ::grpcio::CallOption::default()) } -pub fn mvcc_get_by_start_ts_async_opt(&self, req: &super::kvrpcpb::MvccGetByStartTsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.client.unary_call_async(&METHOD_TIKV_MVCC_GET_BY_START_TS, req, opt) } -pub fn mvcc_get_by_start_ts_async(&self, req: &super::kvrpcpb::MvccGetByStartTsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver,> { self.mvcc_get_by_start_ts_async_opt(req, ::grpcio::CallOption::default()) } -pub fn batch_commands_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.client.duplex_streaming(&METHOD_TIKV_BATCH_COMMANDS, opt) } -pub fn batch_commands(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender,::grpcio::ClientDuplexReceiver,)> { self.batch_commands_opt(::grpcio::CallOption::default()) } -pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static {self.client.spawn(f)} + pub fn new(channel: ::grpcio::Channel) -> Self { + TikvClient { + client: ::grpcio::Client::new(channel), + } + } + pub fn kv_get_opt( + &self, + req: &super::kvrpcpb::GetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_GET, req, opt) + } + pub fn kv_get( + &self, + req: &super::kvrpcpb::GetRequest, + ) -> ::grpcio::Result { + self.kv_get_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_get_async_opt( + &self, + req: &super::kvrpcpb::GetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_TIKV_KV_GET, req, opt) + } + pub fn kv_get_async( + &self, + req: &super::kvrpcpb::GetRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_get_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_scan_opt( + &self, + req: &super::kvrpcpb::ScanRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_SCAN, req, opt) + } + pub fn kv_scan( + &self, + req: &super::kvrpcpb::ScanRequest, + ) -> ::grpcio::Result { + self.kv_scan_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_scan_async_opt( + &self, + req: &super::kvrpcpb::ScanRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_TIKV_KV_SCAN, req, opt) + } + pub fn kv_scan_async( + &self, + req: &super::kvrpcpb::ScanRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_scan_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_prewrite_opt( + &self, + req: &super::kvrpcpb::PrewriteRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_PREWRITE, req, opt) + } + pub fn kv_prewrite( + &self, + req: &super::kvrpcpb::PrewriteRequest, + ) -> ::grpcio::Result { + self.kv_prewrite_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_prewrite_async_opt( + &self, + req: &super::kvrpcpb::PrewriteRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_PREWRITE, req, opt) + } + pub fn kv_prewrite_async( + &self, + req: &super::kvrpcpb::PrewriteRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_prewrite_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_pessimistic_lock_opt( + &self, + req: &super::kvrpcpb::PessimisticLockRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_KV_PESSIMISTIC_LOCK, req, opt) + } + pub fn kv_pessimistic_lock( + &self, + req: &super::kvrpcpb::PessimisticLockRequest, + ) -> ::grpcio::Result { + self.kv_pessimistic_lock_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_pessimistic_lock_async_opt( + &self, + req: &super::kvrpcpb::PessimisticLockRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.client + .unary_call_async(&METHOD_TIKV_KV_PESSIMISTIC_LOCK, req, opt) + } + pub fn kv_pessimistic_lock_async( + &self, + req: &super::kvrpcpb::PessimisticLockRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.kv_pessimistic_lock_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_pessimistic_rollback_opt( + &self, + req: &super::kvrpcpb::PessimisticRollbackRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK, req, opt) + } + pub fn kv_pessimistic_rollback( + &self, + req: &super::kvrpcpb::PessimisticRollbackRequest, + ) -> ::grpcio::Result { + self.kv_pessimistic_rollback_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_pessimistic_rollback_async_opt( + &self, + req: &super::kvrpcpb::PessimisticRollbackRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.client + .unary_call_async(&METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK, req, opt) + } + pub fn kv_pessimistic_rollback_async( + &self, + req: &super::kvrpcpb::PessimisticRollbackRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.kv_pessimistic_rollback_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_commit_opt( + &self, + req: &super::kvrpcpb::CommitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_COMMIT, req, opt) + } + pub fn kv_commit( + &self, + req: &super::kvrpcpb::CommitRequest, + ) -> ::grpcio::Result { + self.kv_commit_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_commit_async_opt( + &self, + req: &super::kvrpcpb::CommitRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_COMMIT, req, opt) + } + pub fn kv_commit_async( + &self, + req: &super::kvrpcpb::CommitRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_commit_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_import_opt( + &self, + req: &super::kvrpcpb::ImportRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_IMPORT, req, opt) + } + pub fn kv_import( + &self, + req: &super::kvrpcpb::ImportRequest, + ) -> ::grpcio::Result { + self.kv_import_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_import_async_opt( + &self, + req: &super::kvrpcpb::ImportRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_IMPORT, req, opt) + } + pub fn kv_import_async( + &self, + req: &super::kvrpcpb::ImportRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_import_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_cleanup_opt( + &self, + req: &super::kvrpcpb::CleanupRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_CLEANUP, req, opt) + } + pub fn kv_cleanup( + &self, + req: &super::kvrpcpb::CleanupRequest, + ) -> ::grpcio::Result { + self.kv_cleanup_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_cleanup_async_opt( + &self, + req: &super::kvrpcpb::CleanupRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_CLEANUP, req, opt) + } + pub fn kv_cleanup_async( + &self, + req: &super::kvrpcpb::CleanupRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_cleanup_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_batch_get_opt( + &self, + req: &super::kvrpcpb::BatchGetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_BATCH_GET, req, opt) + } + pub fn kv_batch_get( + &self, + req: &super::kvrpcpb::BatchGetRequest, + ) -> ::grpcio::Result { + self.kv_batch_get_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_batch_get_async_opt( + &self, + req: &super::kvrpcpb::BatchGetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_BATCH_GET, req, opt) + } + pub fn kv_batch_get_async( + &self, + req: &super::kvrpcpb::BatchGetRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_batch_get_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_batch_rollback_opt( + &self, + req: &super::kvrpcpb::BatchRollbackRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_KV_BATCH_ROLLBACK, req, opt) + } + pub fn kv_batch_rollback( + &self, + req: &super::kvrpcpb::BatchRollbackRequest, + ) -> ::grpcio::Result { + self.kv_batch_rollback_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_batch_rollback_async_opt( + &self, + req: &super::kvrpcpb::BatchRollbackRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.client + .unary_call_async(&METHOD_TIKV_KV_BATCH_ROLLBACK, req, opt) + } + pub fn kv_batch_rollback_async( + &self, + req: &super::kvrpcpb::BatchRollbackRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.kv_batch_rollback_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_scan_lock_opt( + &self, + req: &super::kvrpcpb::ScanLockRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_SCAN_LOCK, req, opt) + } + pub fn kv_scan_lock( + &self, + req: &super::kvrpcpb::ScanLockRequest, + ) -> ::grpcio::Result { + self.kv_scan_lock_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_scan_lock_async_opt( + &self, + req: &super::kvrpcpb::ScanLockRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_SCAN_LOCK, req, opt) + } + pub fn kv_scan_lock_async( + &self, + req: &super::kvrpcpb::ScanLockRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_scan_lock_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_resolve_lock_opt( + &self, + req: &super::kvrpcpb::ResolveLockRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_KV_RESOLVE_LOCK, req, opt) + } + pub fn kv_resolve_lock( + &self, + req: &super::kvrpcpb::ResolveLockRequest, + ) -> ::grpcio::Result { + self.kv_resolve_lock_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_resolve_lock_async_opt( + &self, + req: &super::kvrpcpb::ResolveLockRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_RESOLVE_LOCK, req, opt) + } + pub fn kv_resolve_lock_async( + &self, + req: &super::kvrpcpb::ResolveLockRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_resolve_lock_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_gc_opt( + &self, + req: &super::kvrpcpb::GcRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_KV_GC, req, opt) + } + pub fn kv_gc( + &self, + req: &super::kvrpcpb::GcRequest, + ) -> ::grpcio::Result { + self.kv_gc_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_gc_async_opt( + &self, + req: &super::kvrpcpb::GcRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_TIKV_KV_GC, req, opt) + } + pub fn kv_gc_async( + &self, + req: &super::kvrpcpb::GcRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_gc_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_delete_range_opt( + &self, + req: &super::kvrpcpb::DeleteRangeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_KV_DELETE_RANGE, req, opt) + } + pub fn kv_delete_range( + &self, + req: &super::kvrpcpb::DeleteRangeRequest, + ) -> ::grpcio::Result { + self.kv_delete_range_opt(req, ::grpcio::CallOption::default()) + } + pub fn kv_delete_range_async_opt( + &self, + req: &super::kvrpcpb::DeleteRangeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_KV_DELETE_RANGE, req, opt) + } + pub fn kv_delete_range_async( + &self, + req: &super::kvrpcpb::DeleteRangeRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.kv_delete_range_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_get_opt( + &self, + req: &super::kvrpcpb::RawGetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_RAW_GET, req, opt) + } + pub fn raw_get( + &self, + req: &super::kvrpcpb::RawGetRequest, + ) -> ::grpcio::Result { + self.raw_get_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_get_async_opt( + &self, + req: &super::kvrpcpb::RawGetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_TIKV_RAW_GET, req, opt) + } + pub fn raw_get_async( + &self, + req: &super::kvrpcpb::RawGetRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raw_get_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_get_opt( + &self, + req: &super::kvrpcpb::RawBatchGetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_RAW_BATCH_GET, req, opt) + } + pub fn raw_batch_get( + &self, + req: &super::kvrpcpb::RawBatchGetRequest, + ) -> ::grpcio::Result { + self.raw_batch_get_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_get_async_opt( + &self, + req: &super::kvrpcpb::RawBatchGetRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_RAW_BATCH_GET, req, opt) + } + pub fn raw_batch_get_async( + &self, + req: &super::kvrpcpb::RawBatchGetRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raw_batch_get_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_put_opt( + &self, + req: &super::kvrpcpb::RawPutRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_RAW_PUT, req, opt) + } + pub fn raw_put( + &self, + req: &super::kvrpcpb::RawPutRequest, + ) -> ::grpcio::Result { + self.raw_put_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_put_async_opt( + &self, + req: &super::kvrpcpb::RawPutRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_TIKV_RAW_PUT, req, opt) + } + pub fn raw_put_async( + &self, + req: &super::kvrpcpb::RawPutRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raw_put_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_put_opt( + &self, + req: &super::kvrpcpb::RawBatchPutRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_RAW_BATCH_PUT, req, opt) + } + pub fn raw_batch_put( + &self, + req: &super::kvrpcpb::RawBatchPutRequest, + ) -> ::grpcio::Result { + self.raw_batch_put_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_put_async_opt( + &self, + req: &super::kvrpcpb::RawBatchPutRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_RAW_BATCH_PUT, req, opt) + } + pub fn raw_batch_put_async( + &self, + req: &super::kvrpcpb::RawBatchPutRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raw_batch_put_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_delete_opt( + &self, + req: &super::kvrpcpb::RawDeleteRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_RAW_DELETE, req, opt) + } + pub fn raw_delete( + &self, + req: &super::kvrpcpb::RawDeleteRequest, + ) -> ::grpcio::Result { + self.raw_delete_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_delete_async_opt( + &self, + req: &super::kvrpcpb::RawDeleteRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_RAW_DELETE, req, opt) + } + pub fn raw_delete_async( + &self, + req: &super::kvrpcpb::RawDeleteRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raw_delete_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_delete_opt( + &self, + req: &super::kvrpcpb::RawBatchDeleteRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_RAW_BATCH_DELETE, req, opt) + } + pub fn raw_batch_delete( + &self, + req: &super::kvrpcpb::RawBatchDeleteRequest, + ) -> ::grpcio::Result { + self.raw_batch_delete_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_delete_async_opt( + &self, + req: &super::kvrpcpb::RawBatchDeleteRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.client + .unary_call_async(&METHOD_TIKV_RAW_BATCH_DELETE, req, opt) + } + pub fn raw_batch_delete_async( + &self, + req: &super::kvrpcpb::RawBatchDeleteRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.raw_batch_delete_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_scan_opt( + &self, + req: &super::kvrpcpb::RawScanRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_RAW_SCAN, req, opt) + } + pub fn raw_scan( + &self, + req: &super::kvrpcpb::RawScanRequest, + ) -> ::grpcio::Result { + self.raw_scan_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_scan_async_opt( + &self, + req: &super::kvrpcpb::RawScanRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_RAW_SCAN, req, opt) + } + pub fn raw_scan_async( + &self, + req: &super::kvrpcpb::RawScanRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raw_scan_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_delete_range_opt( + &self, + req: &super::kvrpcpb::RawDeleteRangeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_RAW_DELETE_RANGE, req, opt) + } + pub fn raw_delete_range( + &self, + req: &super::kvrpcpb::RawDeleteRangeRequest, + ) -> ::grpcio::Result { + self.raw_delete_range_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_delete_range_async_opt( + &self, + req: &super::kvrpcpb::RawDeleteRangeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.client + .unary_call_async(&METHOD_TIKV_RAW_DELETE_RANGE, req, opt) + } + pub fn raw_delete_range_async( + &self, + req: &super::kvrpcpb::RawDeleteRangeRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.raw_delete_range_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_scan_opt( + &self, + req: &super::kvrpcpb::RawBatchScanRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_RAW_BATCH_SCAN, req, opt) + } + pub fn raw_batch_scan( + &self, + req: &super::kvrpcpb::RawBatchScanRequest, + ) -> ::grpcio::Result { + self.raw_batch_scan_opt(req, ::grpcio::CallOption::default()) + } + pub fn raw_batch_scan_async_opt( + &self, + req: &super::kvrpcpb::RawBatchScanRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_RAW_BATCH_SCAN, req, opt) + } + pub fn raw_batch_scan_async( + &self, + req: &super::kvrpcpb::RawBatchScanRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.raw_batch_scan_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn unsafe_destroy_range_opt( + &self, + req: &super::kvrpcpb::UnsafeDestroyRangeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_UNSAFE_DESTROY_RANGE, req, opt) + } + pub fn unsafe_destroy_range( + &self, + req: &super::kvrpcpb::UnsafeDestroyRangeRequest, + ) -> ::grpcio::Result { + self.unsafe_destroy_range_opt(req, ::grpcio::CallOption::default()) + } + pub fn unsafe_destroy_range_async_opt( + &self, + req: &super::kvrpcpb::UnsafeDestroyRangeRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.client + .unary_call_async(&METHOD_TIKV_UNSAFE_DESTROY_RANGE, req, opt) + } + pub fn unsafe_destroy_range_async( + &self, + req: &super::kvrpcpb::UnsafeDestroyRangeRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.unsafe_destroy_range_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn coprocessor_opt( + &self, + req: &super::coprocessor::Request, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_COPROCESSOR, req, opt) + } + pub fn coprocessor( + &self, + req: &super::coprocessor::Request, + ) -> ::grpcio::Result { + self.coprocessor_opt(req, ::grpcio::CallOption::default()) + } + pub fn coprocessor_async_opt( + &self, + req: &super::coprocessor::Request, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_COPROCESSOR, req, opt) + } + pub fn coprocessor_async( + &self, + req: &super::coprocessor::Request, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.coprocessor_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn coprocessor_stream_opt( + &self, + req: &super::coprocessor::Request, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.client + .server_streaming(&METHOD_TIKV_COPROCESSOR_STREAM, req, opt) + } + pub fn coprocessor_stream( + &self, + req: &super::coprocessor::Request, + ) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.coprocessor_stream_opt(req, ::grpcio::CallOption::default()) + } + pub fn raft_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.client.client_streaming(&METHOD_TIKV_RAFT, opt) + } + pub fn raft( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.raft_opt(::grpcio::CallOption::default()) + } + pub fn batch_raft_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.client.client_streaming(&METHOD_TIKV_BATCH_RAFT, opt) + } + pub fn batch_raft( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.batch_raft_opt(::grpcio::CallOption::default()) + } + pub fn snapshot_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.client.client_streaming(&METHOD_TIKV_SNAPSHOT, opt) + } + pub fn snapshot( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientCStreamSender, + ::grpcio::ClientCStreamReceiver, + )> { + self.snapshot_opt(::grpcio::CallOption::default()) + } + pub fn split_region_opt( + &self, + req: &super::kvrpcpb::SplitRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_SPLIT_REGION, req, opt) + } + pub fn split_region( + &self, + req: &super::kvrpcpb::SplitRegionRequest, + ) -> ::grpcio::Result { + self.split_region_opt(req, ::grpcio::CallOption::default()) + } + pub fn split_region_async_opt( + &self, + req: &super::kvrpcpb::SplitRegionRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_SPLIT_REGION, req, opt) + } + pub fn split_region_async( + &self, + req: &super::kvrpcpb::SplitRegionRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.split_region_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn read_index_opt( + &self, + req: &super::kvrpcpb::ReadIndexRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client.unary_call(&METHOD_TIKV_READ_INDEX, req, opt) + } + pub fn read_index( + &self, + req: &super::kvrpcpb::ReadIndexRequest, + ) -> ::grpcio::Result { + self.read_index_opt(req, ::grpcio::CallOption::default()) + } + pub fn read_index_async_opt( + &self, + req: &super::kvrpcpb::ReadIndexRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_READ_INDEX, req, opt) + } + pub fn read_index_async( + &self, + req: &super::kvrpcpb::ReadIndexRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.read_index_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn mvcc_get_by_key_opt( + &self, + req: &super::kvrpcpb::MvccGetByKeyRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_MVCC_GET_BY_KEY, req, opt) + } + pub fn mvcc_get_by_key( + &self, + req: &super::kvrpcpb::MvccGetByKeyRequest, + ) -> ::grpcio::Result { + self.mvcc_get_by_key_opt(req, ::grpcio::CallOption::default()) + } + pub fn mvcc_get_by_key_async_opt( + &self, + req: &super::kvrpcpb::MvccGetByKeyRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client + .unary_call_async(&METHOD_TIKV_MVCC_GET_BY_KEY, req, opt) + } + pub fn mvcc_get_by_key_async( + &self, + req: &super::kvrpcpb::MvccGetByKeyRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.mvcc_get_by_key_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn mvcc_get_by_start_ts_opt( + &self, + req: &super::kvrpcpb::MvccGetByStartTsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result { + self.client + .unary_call(&METHOD_TIKV_MVCC_GET_BY_START_TS, req, opt) + } + pub fn mvcc_get_by_start_ts( + &self, + req: &super::kvrpcpb::MvccGetByStartTsRequest, + ) -> ::grpcio::Result { + self.mvcc_get_by_start_ts_opt(req, ::grpcio::CallOption::default()) + } + pub fn mvcc_get_by_start_ts_async_opt( + &self, + req: &super::kvrpcpb::MvccGetByStartTsRequest, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.client + .unary_call_async(&METHOD_TIKV_MVCC_GET_BY_START_TS, req, opt) + } + pub fn mvcc_get_by_start_ts_async( + &self, + req: &super::kvrpcpb::MvccGetByStartTsRequest, + ) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> + { + self.mvcc_get_by_start_ts_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn batch_commands_opt( + &self, + opt: ::grpcio::CallOption, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.client + .duplex_streaming(&METHOD_TIKV_BATCH_COMMANDS, opt) + } + pub fn batch_commands( + &self, + ) -> ::grpcio::Result<( + ::grpcio::ClientDuplexSender, + ::grpcio::ClientDuplexReceiver, + )> { + self.batch_commands_opt(::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) + where + F: ::futures::Future + Send + 'static, + { + self.client.spawn(f) + } } pub trait Tikv { -fn kv_get(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::GetRequest, sink: ::grpcio::UnarySink); -fn kv_scan(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::ScanRequest, sink: ::grpcio::UnarySink); -fn kv_prewrite(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::PrewriteRequest, sink: ::grpcio::UnarySink); -fn kv_pessimistic_lock(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::PessimisticLockRequest, sink: ::grpcio::UnarySink); -fn kv_pessimistic_rollback(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::PessimisticRollbackRequest, sink: ::grpcio::UnarySink); -fn kv_commit(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::CommitRequest, sink: ::grpcio::UnarySink); -fn kv_import(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::ImportRequest, sink: ::grpcio::UnarySink); -fn kv_cleanup(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::CleanupRequest, sink: ::grpcio::UnarySink); -fn kv_batch_get(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::BatchGetRequest, sink: ::grpcio::UnarySink); -fn kv_batch_rollback(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::BatchRollbackRequest, sink: ::grpcio::UnarySink); -fn kv_scan_lock(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::ScanLockRequest, sink: ::grpcio::UnarySink); -fn kv_resolve_lock(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::ResolveLockRequest, sink: ::grpcio::UnarySink); -fn kv_gc(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::GcRequest, sink: ::grpcio::UnarySink); -fn kv_delete_range(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::DeleteRangeRequest, sink: ::grpcio::UnarySink); -fn raw_get(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawGetRequest, sink: ::grpcio::UnarySink); -fn raw_batch_get(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawBatchGetRequest, sink: ::grpcio::UnarySink); -fn raw_put(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawPutRequest, sink: ::grpcio::UnarySink); -fn raw_batch_put(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawBatchPutRequest, sink: ::grpcio::UnarySink); -fn raw_delete(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawDeleteRequest, sink: ::grpcio::UnarySink); -fn raw_batch_delete(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawBatchDeleteRequest, sink: ::grpcio::UnarySink); -fn raw_scan(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawScanRequest, sink: ::grpcio::UnarySink); -fn raw_delete_range(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawDeleteRangeRequest, sink: ::grpcio::UnarySink); -fn raw_batch_scan(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::RawBatchScanRequest, sink: ::grpcio::UnarySink); -fn unsafe_destroy_range(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::UnsafeDestroyRangeRequest, sink: ::grpcio::UnarySink); -fn coprocessor(&mut self, ctx: ::grpcio::RpcContext, req: super::coprocessor::Request, sink: ::grpcio::UnarySink); -fn coprocessor_stream(&mut self, ctx: ::grpcio::RpcContext, req: super::coprocessor::Request, sink: ::grpcio::ServerStreamingSink); -fn raft(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::ClientStreamingSink); -fn batch_raft(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::ClientStreamingSink); -fn snapshot(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::ClientStreamingSink); -fn split_region(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::SplitRegionRequest, sink: ::grpcio::UnarySink); -fn read_index(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::ReadIndexRequest, sink: ::grpcio::UnarySink); -fn mvcc_get_by_key(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::MvccGetByKeyRequest, sink: ::grpcio::UnarySink); -fn mvcc_get_by_start_ts(&mut self, ctx: ::grpcio::RpcContext, req: super::kvrpcpb::MvccGetByStartTsRequest, sink: ::grpcio::UnarySink); -fn batch_commands(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); + fn kv_get( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::GetRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_scan( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::ScanRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_prewrite( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::PrewriteRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_pessimistic_lock( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::PessimisticLockRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_pessimistic_rollback( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::PessimisticRollbackRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_commit( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::CommitRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_import( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::ImportRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_cleanup( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::CleanupRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_batch_get( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::BatchGetRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_batch_rollback( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::BatchRollbackRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_scan_lock( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::ScanLockRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_resolve_lock( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::ResolveLockRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_gc( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::GcRequest, + sink: ::grpcio::UnarySink, + ); + fn kv_delete_range( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::DeleteRangeRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_get( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawGetRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_batch_get( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawBatchGetRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_put( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawPutRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_batch_put( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawBatchPutRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_delete( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawDeleteRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_batch_delete( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawBatchDeleteRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_scan( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawScanRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_delete_range( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawDeleteRangeRequest, + sink: ::grpcio::UnarySink, + ); + fn raw_batch_scan( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::RawBatchScanRequest, + sink: ::grpcio::UnarySink, + ); + fn unsafe_destroy_range( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::UnsafeDestroyRangeRequest, + sink: ::grpcio::UnarySink, + ); + fn coprocessor( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::coprocessor::Request, + sink: ::grpcio::UnarySink, + ); + fn coprocessor_stream( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::coprocessor::Request, + sink: ::grpcio::ServerStreamingSink, + ); + fn raft( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::ClientStreamingSink, + ); + fn batch_raft( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::ClientStreamingSink, + ); + fn snapshot( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::ClientStreamingSink, + ); + fn split_region( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::SplitRegionRequest, + sink: ::grpcio::UnarySink, + ); + fn read_index( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::ReadIndexRequest, + sink: ::grpcio::UnarySink, + ); + fn mvcc_get_by_key( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::MvccGetByKeyRequest, + sink: ::grpcio::UnarySink, + ); + fn mvcc_get_by_start_ts( + &mut self, + ctx: ::grpcio::RpcContext, + req: super::kvrpcpb::MvccGetByStartTsRequest, + sink: ::grpcio::UnarySink, + ); + fn batch_commands( + &mut self, + ctx: ::grpcio::RpcContext, + stream: ::grpcio::RequestStream, + sink: ::grpcio::DuplexSink, + ); } pub fn create_tikv(s: S) -> ::grpcio::Service { -let mut builder = ::grpcio::ServiceBuilder::new(); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_GET, move |ctx, req, resp| instance.kv_get(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_SCAN, move |ctx, req, resp| instance.kv_scan(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_PREWRITE, move |ctx, req, resp| instance.kv_prewrite(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_PESSIMISTIC_LOCK, move |ctx, req, resp| instance.kv_pessimistic_lock(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK, move |ctx, req, resp| instance.kv_pessimistic_rollback(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_COMMIT, move |ctx, req, resp| instance.kv_commit(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_IMPORT, move |ctx, req, resp| instance.kv_import(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_CLEANUP, move |ctx, req, resp| instance.kv_cleanup(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_BATCH_GET, move |ctx, req, resp| instance.kv_batch_get(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_BATCH_ROLLBACK, move |ctx, req, resp| instance.kv_batch_rollback(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_SCAN_LOCK, move |ctx, req, resp| instance.kv_scan_lock(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_RESOLVE_LOCK, move |ctx, req, resp| instance.kv_resolve_lock(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_GC, move |ctx, req, resp| instance.kv_gc(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_KV_DELETE_RANGE, move |ctx, req, resp| instance.kv_delete_range(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_GET, move |ctx, req, resp| instance.raw_get(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_GET, move |ctx, req, resp| instance.raw_batch_get(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_PUT, move |ctx, req, resp| instance.raw_put(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_PUT, move |ctx, req, resp| instance.raw_batch_put(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_DELETE, move |ctx, req, resp| instance.raw_delete(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_DELETE, move |ctx, req, resp| instance.raw_batch_delete(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_SCAN, move |ctx, req, resp| instance.raw_scan(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_DELETE_RANGE, move |ctx, req, resp| instance.raw_delete_range(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_SCAN, move |ctx, req, resp| instance.raw_batch_scan(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_UNSAFE_DESTROY_RANGE, move |ctx, req, resp| instance.unsafe_destroy_range(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_COPROCESSOR, move |ctx, req, resp| instance.coprocessor(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_server_streaming_handler(&METHOD_TIKV_COPROCESSOR_STREAM, move |ctx, req, resp| instance.coprocessor_stream(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_client_streaming_handler(&METHOD_TIKV_RAFT, move |ctx, req, resp| instance.raft(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_client_streaming_handler(&METHOD_TIKV_BATCH_RAFT, move |ctx, req, resp| instance.batch_raft(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_client_streaming_handler(&METHOD_TIKV_SNAPSHOT, move |ctx, req, resp| instance.snapshot(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_SPLIT_REGION, move |ctx, req, resp| instance.split_region(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_READ_INDEX, move |ctx, req, resp| instance.read_index(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_MVCC_GET_BY_KEY, move |ctx, req, resp| instance.mvcc_get_by_key(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_unary_handler(&METHOD_TIKV_MVCC_GET_BY_START_TS, move |ctx, req, resp| instance.mvcc_get_by_start_ts(ctx, req, resp)); -let mut instance = s.clone(); -builder = builder.add_duplex_streaming_handler(&METHOD_TIKV_BATCH_COMMANDS, move |ctx, req, resp| instance.batch_commands(ctx, req, resp)); -builder.build() + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_GET, move |ctx, req, resp| { + instance.kv_get(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_SCAN, move |ctx, req, resp| { + instance.kv_scan(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_PREWRITE, move |ctx, req, resp| { + instance.kv_prewrite(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_PESSIMISTIC_LOCK, move |ctx, req, resp| { + instance.kv_pessimistic_lock(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler( + &METHOD_TIKV_KV_PESSIMISTIC_ROLLBACK, + move |ctx, req, resp| instance.kv_pessimistic_rollback(ctx, req, resp), + ); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_COMMIT, move |ctx, req, resp| { + instance.kv_commit(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_IMPORT, move |ctx, req, resp| { + instance.kv_import(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_CLEANUP, move |ctx, req, resp| { + instance.kv_cleanup(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_BATCH_GET, move |ctx, req, resp| { + instance.kv_batch_get(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_BATCH_ROLLBACK, move |ctx, req, resp| { + instance.kv_batch_rollback(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_SCAN_LOCK, move |ctx, req, resp| { + instance.kv_scan_lock(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_RESOLVE_LOCK, move |ctx, req, resp| { + instance.kv_resolve_lock(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_GC, move |ctx, req, resp| { + instance.kv_gc(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_KV_DELETE_RANGE, move |ctx, req, resp| { + instance.kv_delete_range(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_GET, move |ctx, req, resp| { + instance.raw_get(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_GET, move |ctx, req, resp| { + instance.raw_batch_get(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_PUT, move |ctx, req, resp| { + instance.raw_put(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_PUT, move |ctx, req, resp| { + instance.raw_batch_put(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_DELETE, move |ctx, req, resp| { + instance.raw_delete(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_DELETE, move |ctx, req, resp| { + instance.raw_batch_delete(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_SCAN, move |ctx, req, resp| { + instance.raw_scan(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_DELETE_RANGE, move |ctx, req, resp| { + instance.raw_delete_range(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_RAW_BATCH_SCAN, move |ctx, req, resp| { + instance.raw_batch_scan(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_unary_handler(&METHOD_TIKV_UNSAFE_DESTROY_RANGE, move |ctx, req, resp| { + instance.unsafe_destroy_range(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_COPROCESSOR, move |ctx, req, resp| { + instance.coprocessor(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_server_streaming_handler(&METHOD_TIKV_COPROCESSOR_STREAM, move |ctx, req, resp| { + instance.coprocessor_stream(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_client_streaming_handler(&METHOD_TIKV_RAFT, move |ctx, req, resp| { + instance.raft(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_client_streaming_handler(&METHOD_TIKV_BATCH_RAFT, move |ctx, req, resp| { + instance.batch_raft(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_client_streaming_handler(&METHOD_TIKV_SNAPSHOT, move |ctx, req, resp| { + instance.snapshot(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_SPLIT_REGION, move |ctx, req, resp| { + instance.split_region(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_READ_INDEX, move |ctx, req, resp| { + instance.read_index(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_TIKV_MVCC_GET_BY_KEY, move |ctx, req, resp| { + instance.mvcc_get_by_key(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_unary_handler(&METHOD_TIKV_MVCC_GET_BY_START_TS, move |ctx, req, resp| { + instance.mvcc_get_by_start_ts(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder + .add_duplex_streaming_handler(&METHOD_TIKV_BATCH_COMMANDS, move |ctx, req, resp| { + instance.batch_commands(ctx, req, resp) + }); + builder.build() } diff --git a/src/prost/wrapper_coprocessor.rs b/src/prost/wrapper_coprocessor.rs index 0cd7fd1c4..bc4778b97 100644 --- a/src/prost/wrapper_coprocessor.rs +++ b/src/prost/wrapper_coprocessor.rs @@ -1,200 +1,505 @@ // Generated file, please don't edit manually. impl KeyRange { -pub fn new_() -> KeyRange { ::std::default::Default::default() } -#[inline] pub fn clear_start(&mut self) { self.start.clear(); } -#[inline] pub fn set_start(&mut self, v: std :: vec :: Vec < u8 >) { self.start = v; } -#[inline] pub fn get_start(&self) -> &[u8] { &self.start } -#[inline] pub fn mut_start(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start } -#[inline] pub fn take_start(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end(&mut self) { self.end.clear(); } -#[inline] pub fn set_end(&mut self, v: std :: vec :: Vec < u8 >) { self.end = v; } -#[inline] pub fn get_end(&self) -> &[u8] { &self.end } -#[inline] pub fn mut_end(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end } -#[inline] pub fn take_end(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end, ::std::vec::Vec::new()) } + pub fn new_() -> KeyRange { + ::std::default::Default::default() + } + #[inline] + pub fn clear_start(&mut self) { + self.start.clear(); + } + #[inline] + pub fn set_start(&mut self, v: std::vec::Vec) { + self.start = v; + } + #[inline] + pub fn get_start(&self) -> &[u8] { + &self.start + } + #[inline] + pub fn mut_start(&mut self) -> &mut std::vec::Vec { + &mut self.start + } + #[inline] + pub fn take_start(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end(&mut self) { + self.end.clear(); + } + #[inline] + pub fn set_end(&mut self, v: std::vec::Vec) { + self.end = v; + } + #[inline] + pub fn get_end(&self) -> &[u8] { + &self.end + } + #[inline] + pub fn mut_end(&mut self) -> &mut std::vec::Vec { + &mut self.end + } + #[inline] + pub fn take_end(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for KeyRange {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for KeyRange { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for KeyRange {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static KeyRange { - ::lazy_static::lazy_static! { - static ref INSTANCE: KeyRange = KeyRange::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for KeyRange { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static KeyRange { + ::lazy_static::lazy_static! { + static ref INSTANCE: KeyRange = KeyRange::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Request { -pub fn new_() -> Request { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: super :: kvrpcpb :: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &super :: kvrpcpb :: Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut super :: kvrpcpb :: Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(super :: kvrpcpb :: Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> super :: kvrpcpb :: Context { self.context.take().unwrap_or_else(super :: kvrpcpb :: Context::default) } -#[inline] pub fn clear_tp(&mut self) { self.tp = 0 } -#[inline] pub fn set_tp(&mut self, v: i64) { self.tp = v; } -#[inline] pub fn get_tp(&self) -> i64 { self.tp } -#[inline] pub fn clear_data(&mut self) { self.data.clear(); } -#[inline] pub fn set_data(&mut self, v: std :: vec :: Vec < u8 >) { self.data = v; } -#[inline] pub fn get_data(&self) -> &[u8] { &self.data } -#[inline] pub fn mut_data(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.data } -#[inline] pub fn take_data(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) } -#[inline] pub fn clear_ranges(&mut self) { self.ranges.clear(); } -#[inline] pub fn set_ranges(&mut self, v: :: std :: vec :: Vec < KeyRange >) { self.ranges = v; } -#[inline] pub fn get_ranges(&self) -> &:: std :: vec :: Vec < KeyRange > { &self.ranges } -#[inline] pub fn mut_ranges(&mut self) -> &mut :: std :: vec :: Vec < KeyRange > { &mut self.ranges } -#[inline] pub fn take_ranges(&mut self) -> :: std :: vec :: Vec < KeyRange > { ::std::mem::replace(&mut self.ranges, ::std::vec::Vec::new()) } + pub fn new_() -> Request { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: super::kvrpcpb::Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &super::kvrpcpb::Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut super::kvrpcpb::Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(super::kvrpcpb::Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> super::kvrpcpb::Context { + self.context + .take() + .unwrap_or_else(super::kvrpcpb::Context::default) + } + #[inline] + pub fn clear_tp(&mut self) { + self.tp = 0 + } + #[inline] + pub fn set_tp(&mut self, v: i64) { + self.tp = v; + } + #[inline] + pub fn get_tp(&self) -> i64 { + self.tp + } + #[inline] + pub fn clear_data(&mut self) { + self.data.clear(); + } + #[inline] + pub fn set_data(&mut self, v: std::vec::Vec) { + self.data = v; + } + #[inline] + pub fn get_data(&self) -> &[u8] { + &self.data + } + #[inline] + pub fn mut_data(&mut self) -> &mut std::vec::Vec { + &mut self.data + } + #[inline] + pub fn take_data(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_ranges(&mut self) { + self.ranges.clear(); + } + #[inline] + pub fn set_ranges(&mut self, v: ::std::vec::Vec) { + self.ranges = v; + } + #[inline] + pub fn get_ranges(&self) -> &::std::vec::Vec { + &self.ranges + } + #[inline] + pub fn mut_ranges(&mut self) -> &mut ::std::vec::Vec { + &mut self.ranges + } + #[inline] + pub fn take_ranges(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.ranges, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for Request {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Request { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Request {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Request { - ::lazy_static::lazy_static! { - static ref INSTANCE: Request = Request::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for Request { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Request { + ::lazy_static::lazy_static! { + static ref INSTANCE: Request = Request::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Response { -pub fn new_() -> Response { ::std::default::Default::default() } -#[inline] pub fn clear_data(&mut self) { self.data.clear(); } -#[inline] pub fn set_data(&mut self, v: std :: vec :: Vec < u8 >) { self.data = v; } -#[inline] pub fn get_data(&self) -> &[u8] { &self.data } -#[inline] pub fn mut_data(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.data } -#[inline] pub fn take_data(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_locked(&self) -> bool { self.locked.is_some() } -#[inline] pub fn clear_locked(&mut self) { self.locked = ::std::option::Option::None } -#[inline] pub fn set_locked(&mut self, v: super :: kvrpcpb :: LockInfo) { self.locked = ::std::option::Option::Some(v); } -#[inline] pub fn get_locked(&self) -> &super :: kvrpcpb :: LockInfo { match self.locked.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_locked(&mut self) -> &mut super :: kvrpcpb :: LockInfo { if self.locked.is_none() { - self.locked = ::std::option::Option::Some(super :: kvrpcpb :: LockInfo::default()); - } - self.locked.as_mut().unwrap() } -#[inline] pub fn take_locked(&mut self) -> super :: kvrpcpb :: LockInfo { self.locked.take().unwrap_or_else(super :: kvrpcpb :: LockInfo::default) } -#[inline] pub fn clear_other_error(&mut self) { self.other_error.clear(); } -#[inline] pub fn set_other_error(&mut self, v: std :: string :: String) { self.other_error = v; } -#[inline] pub fn get_other_error(&self) -> &str { &self.other_error } -#[inline] pub fn mut_other_error(&mut self) -> &mut std :: string :: String { &mut self.other_error } -#[inline] pub fn take_other_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.other_error, ::std::string::String::new()) } -#[inline] pub fn has_range(&self) -> bool { self.range.is_some() } -#[inline] pub fn clear_range(&mut self) { self.range = ::std::option::Option::None } -#[inline] pub fn set_range(&mut self, v: KeyRange) { self.range = ::std::option::Option::Some(v); } -#[inline] pub fn get_range(&self) -> &KeyRange { match self.range.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_range(&mut self) -> &mut KeyRange { if self.range.is_none() { - self.range = ::std::option::Option::Some(KeyRange::default()); - } - self.range.as_mut().unwrap() } -#[inline] pub fn take_range(&mut self) -> KeyRange { self.range.take().unwrap_or_else(KeyRange::default) } -#[inline] pub fn has_exec_details(&self) -> bool { self.exec_details.is_some() } -#[inline] pub fn clear_exec_details(&mut self) { self.exec_details = ::std::option::Option::None } -#[inline] pub fn set_exec_details(&mut self, v: super :: kvrpcpb :: ExecDetails) { self.exec_details = ::std::option::Option::Some(v); } -#[inline] pub fn get_exec_details(&self) -> &super :: kvrpcpb :: ExecDetails { match self.exec_details.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_exec_details(&mut self) -> &mut super :: kvrpcpb :: ExecDetails { if self.exec_details.is_none() { - self.exec_details = ::std::option::Option::Some(super :: kvrpcpb :: ExecDetails::default()); - } - self.exec_details.as_mut().unwrap() } -#[inline] pub fn take_exec_details(&mut self) -> super :: kvrpcpb :: ExecDetails { self.exec_details.take().unwrap_or_else(super :: kvrpcpb :: ExecDetails::default) } + pub fn new_() -> Response { + ::std::default::Default::default() + } + #[inline] + pub fn clear_data(&mut self) { + self.data.clear(); + } + #[inline] + pub fn set_data(&mut self, v: std::vec::Vec) { + self.data = v; + } + #[inline] + pub fn get_data(&self) -> &[u8] { + &self.data + } + #[inline] + pub fn mut_data(&mut self) -> &mut std::vec::Vec { + &mut self.data + } + #[inline] + pub fn take_data(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_locked(&self) -> bool { + self.locked.is_some() + } + #[inline] + pub fn clear_locked(&mut self) { + self.locked = ::std::option::Option::None + } + #[inline] + pub fn set_locked(&mut self, v: super::kvrpcpb::LockInfo) { + self.locked = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_locked(&self) -> &super::kvrpcpb::LockInfo { + match self.locked.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_locked(&mut self) -> &mut super::kvrpcpb::LockInfo { + if self.locked.is_none() { + self.locked = ::std::option::Option::Some(super::kvrpcpb::LockInfo::default()); + } + self.locked.as_mut().unwrap() + } + #[inline] + pub fn take_locked(&mut self) -> super::kvrpcpb::LockInfo { + self.locked + .take() + .unwrap_or_else(super::kvrpcpb::LockInfo::default) + } + #[inline] + pub fn clear_other_error(&mut self) { + self.other_error.clear(); + } + #[inline] + pub fn set_other_error(&mut self, v: std::string::String) { + self.other_error = v; + } + #[inline] + pub fn get_other_error(&self) -> &str { + &self.other_error + } + #[inline] + pub fn mut_other_error(&mut self) -> &mut std::string::String { + &mut self.other_error + } + #[inline] + pub fn take_other_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.other_error, ::std::string::String::new()) + } + #[inline] + pub fn has_range(&self) -> bool { + self.range.is_some() + } + #[inline] + pub fn clear_range(&mut self) { + self.range = ::std::option::Option::None + } + #[inline] + pub fn set_range(&mut self, v: KeyRange) { + self.range = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_range(&self) -> &KeyRange { + match self.range.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_range(&mut self) -> &mut KeyRange { + if self.range.is_none() { + self.range = ::std::option::Option::Some(KeyRange::default()); + } + self.range.as_mut().unwrap() + } + #[inline] + pub fn take_range(&mut self) -> KeyRange { + self.range.take().unwrap_or_else(KeyRange::default) + } + #[inline] + pub fn has_exec_details(&self) -> bool { + self.exec_details.is_some() + } + #[inline] + pub fn clear_exec_details(&mut self) { + self.exec_details = ::std::option::Option::None + } + #[inline] + pub fn set_exec_details(&mut self, v: super::kvrpcpb::ExecDetails) { + self.exec_details = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_exec_details(&self) -> &super::kvrpcpb::ExecDetails { + match self.exec_details.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_exec_details(&mut self) -> &mut super::kvrpcpb::ExecDetails { + if self.exec_details.is_none() { + self.exec_details = ::std::option::Option::Some(super::kvrpcpb::ExecDetails::default()); + } + self.exec_details.as_mut().unwrap() + } + #[inline] + pub fn take_exec_details(&mut self) -> super::kvrpcpb::ExecDetails { + self.exec_details + .take() + .unwrap_or_else(super::kvrpcpb::ExecDetails::default) + } } -impl ::protobuf::Clear for Response {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Response { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Response {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Response { - ::lazy_static::lazy_static! { - static ref INSTANCE: Response = Response::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for Response { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Response { + ::lazy_static::lazy_static! { + static ref INSTANCE: Response = Response::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } diff --git a/src/prost/wrapper_deadlockpb.rs b/src/prost/wrapper_deadlockpb.rs index 2c17ccfab..34cf72c62 100644 --- a/src/prost/wrapper_deadlockpb.rs +++ b/src/prost/wrapper_deadlockpb.rs @@ -1,231 +1,507 @@ // Generated file, please don't edit manually. impl WaitForEntriesRequest { -pub fn new_() -> WaitForEntriesRequest { ::std::default::Default::default() } -} -impl ::protobuf::Clear for WaitForEntriesRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WaitForEntriesRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WaitForEntriesRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: WaitForEntriesRequest = WaitForEntriesRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> WaitForEntriesRequest { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for WaitForEntriesRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WaitForEntriesRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WaitForEntriesRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: WaitForEntriesRequest = WaitForEntriesRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl WaitForEntriesResponse { -pub fn new_() -> WaitForEntriesResponse { ::std::default::Default::default() } -#[inline] pub fn clear_entries(&mut self) { self.entries.clear(); } -#[inline] pub fn set_entries(&mut self, v: :: std :: vec :: Vec < WaitForEntry >) { self.entries = v; } -#[inline] pub fn get_entries(&self) -> &:: std :: vec :: Vec < WaitForEntry > { &self.entries } -#[inline] pub fn mut_entries(&mut self) -> &mut :: std :: vec :: Vec < WaitForEntry > { &mut self.entries } -#[inline] pub fn take_entries(&mut self) -> :: std :: vec :: Vec < WaitForEntry > { ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for WaitForEntriesResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WaitForEntriesResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WaitForEntriesResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: WaitForEntriesResponse = WaitForEntriesResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> WaitForEntriesResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_entries(&mut self) { + self.entries.clear(); + } + #[inline] + pub fn set_entries(&mut self, v: ::std::vec::Vec) { + self.entries = v; + } + #[inline] + pub fn get_entries(&self) -> &::std::vec::Vec { + &self.entries + } + #[inline] + pub fn mut_entries(&mut self) -> &mut ::std::vec::Vec { + &mut self.entries + } + #[inline] + pub fn take_entries(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for WaitForEntriesResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WaitForEntriesResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WaitForEntriesResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: WaitForEntriesResponse = WaitForEntriesResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl WaitForEntry { -pub fn new_() -> WaitForEntry { ::std::default::Default::default() } -#[inline] pub fn clear_txn(&mut self) { self.txn = 0 } -#[inline] pub fn set_txn(&mut self, v: u64) { self.txn = v; } -#[inline] pub fn get_txn(&self) -> u64 { self.txn } -#[inline] pub fn clear_wait_for_txn(&mut self) { self.wait_for_txn = 0 } -#[inline] pub fn set_wait_for_txn(&mut self, v: u64) { self.wait_for_txn = v; } -#[inline] pub fn get_wait_for_txn(&self) -> u64 { self.wait_for_txn } -#[inline] pub fn clear_key_hash(&mut self) { self.key_hash = 0 } -#[inline] pub fn set_key_hash(&mut self, v: u64) { self.key_hash = v; } -#[inline] pub fn get_key_hash(&self) -> u64 { self.key_hash } -} -impl ::protobuf::Clear for WaitForEntry {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WaitForEntry {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WaitForEntry { - ::lazy_static::lazy_static! { - static ref INSTANCE: WaitForEntry = WaitForEntry::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> WaitForEntry { + ::std::default::Default::default() + } + #[inline] + pub fn clear_txn(&mut self) { + self.txn = 0 + } + #[inline] + pub fn set_txn(&mut self, v: u64) { + self.txn = v; + } + #[inline] + pub fn get_txn(&self) -> u64 { + self.txn + } + #[inline] + pub fn clear_wait_for_txn(&mut self) { + self.wait_for_txn = 0 + } + #[inline] + pub fn set_wait_for_txn(&mut self, v: u64) { + self.wait_for_txn = v; + } + #[inline] + pub fn get_wait_for_txn(&self) -> u64 { + self.wait_for_txn + } + #[inline] + pub fn clear_key_hash(&mut self) { + self.key_hash = 0 + } + #[inline] + pub fn set_key_hash(&mut self, v: u64) { + self.key_hash = v; + } + #[inline] + pub fn get_key_hash(&self) -> u64 { + self.key_hash + } +} +impl ::protobuf::Clear for WaitForEntry { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WaitForEntry { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WaitForEntry { + ::lazy_static::lazy_static! { + static ref INSTANCE: WaitForEntry = WaitForEntry::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeadlockRequest { -pub fn new_() -> DeadlockRequest { ::std::default::Default::default() } -#[inline] pub fn clear_tp(&mut self) { self.tp = 0 } -#[inline] pub fn set_tp_(&mut self, v: DeadlockRequestType) { self.tp = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_tp(&self) -> DeadlockRequestType { unsafe { ::std::mem::transmute::(self.tp) } } -#[inline] pub fn has_entry(&self) -> bool { self.entry.is_some() } -#[inline] pub fn clear_entry(&mut self) { self.entry = ::std::option::Option::None } -#[inline] pub fn set_entry(&mut self, v: WaitForEntry) { self.entry = ::std::option::Option::Some(v); } -#[inline] pub fn get_entry(&self) -> &WaitForEntry { match self.entry.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_entry(&mut self) -> &mut WaitForEntry { if self.entry.is_none() { - self.entry = ::std::option::Option::Some(WaitForEntry::default()); - } - self.entry.as_mut().unwrap() } -#[inline] pub fn take_entry(&mut self) -> WaitForEntry { self.entry.take().unwrap_or_else(WaitForEntry::default) } -} -impl ::protobuf::Clear for DeadlockRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeadlockRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeadlockRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeadlockRequest = DeadlockRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> DeadlockRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_tp(&mut self) { + self.tp = 0 + } + #[inline] + pub fn set_tp_(&mut self, v: DeadlockRequestType) { + self.tp = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_tp(&self) -> DeadlockRequestType { + unsafe { ::std::mem::transmute::(self.tp) } + } + #[inline] + pub fn has_entry(&self) -> bool { + self.entry.is_some() + } + #[inline] + pub fn clear_entry(&mut self) { + self.entry = ::std::option::Option::None + } + #[inline] + pub fn set_entry(&mut self, v: WaitForEntry) { + self.entry = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_entry(&self) -> &WaitForEntry { + match self.entry.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_entry(&mut self) -> &mut WaitForEntry { + if self.entry.is_none() { + self.entry = ::std::option::Option::Some(WaitForEntry::default()); } + self.entry.as_mut().unwrap() + } + #[inline] + pub fn take_entry(&mut self) -> WaitForEntry { + self.entry.take().unwrap_or_else(WaitForEntry::default) + } +} +impl ::protobuf::Clear for DeadlockRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeadlockRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeadlockRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeadlockRequest = DeadlockRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeadlockResponse { -pub fn new_() -> DeadlockResponse { ::std::default::Default::default() } -#[inline] pub fn has_entry(&self) -> bool { self.entry.is_some() } -#[inline] pub fn clear_entry(&mut self) { self.entry = ::std::option::Option::None } -#[inline] pub fn set_entry(&mut self, v: WaitForEntry) { self.entry = ::std::option::Option::Some(v); } -#[inline] pub fn get_entry(&self) -> &WaitForEntry { match self.entry.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_entry(&mut self) -> &mut WaitForEntry { if self.entry.is_none() { - self.entry = ::std::option::Option::Some(WaitForEntry::default()); - } - self.entry.as_mut().unwrap() } -#[inline] pub fn take_entry(&mut self) -> WaitForEntry { self.entry.take().unwrap_or_else(WaitForEntry::default) } -#[inline] pub fn clear_deadlock_key_hash(&mut self) { self.deadlock_key_hash = 0 } -#[inline] pub fn set_deadlock_key_hash(&mut self, v: u64) { self.deadlock_key_hash = v; } -#[inline] pub fn get_deadlock_key_hash(&self) -> u64 { self.deadlock_key_hash } -} -impl ::protobuf::Clear for DeadlockResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeadlockResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeadlockResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeadlockResponse = DeadlockResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> DeadlockResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_entry(&self) -> bool { + self.entry.is_some() + } + #[inline] + pub fn clear_entry(&mut self) { + self.entry = ::std::option::Option::None + } + #[inline] + pub fn set_entry(&mut self, v: WaitForEntry) { + self.entry = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_entry(&self) -> &WaitForEntry { + match self.entry.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_entry(&mut self) -> &mut WaitForEntry { + if self.entry.is_none() { + self.entry = ::std::option::Option::Some(WaitForEntry::default()); } + self.entry.as_mut().unwrap() + } + #[inline] + pub fn take_entry(&mut self) -> WaitForEntry { + self.entry.take().unwrap_or_else(WaitForEntry::default) + } + #[inline] + pub fn clear_deadlock_key_hash(&mut self) { + self.deadlock_key_hash = 0 + } + #[inline] + pub fn set_deadlock_key_hash(&mut self, v: u64) { + self.deadlock_key_hash = v; + } + #[inline] + pub fn get_deadlock_key_hash(&self) -> u64 { + self.deadlock_key_hash + } } -impl DeadlockRequestType { -pub fn values() -> &'static [Self] { -static VALUES: &'static [DeadlockRequestType] = &[ -DeadlockRequestType::Detect, -DeadlockRequestType::CleanUpWaitFor, -DeadlockRequestType::CleanUp, -]; -VALUES +impl ::protobuf::Clear for DeadlockResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeadlockResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeadlockResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeadlockResponse = DeadlockResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } +impl DeadlockRequestType { + pub fn values() -> &'static [Self] { + static VALUES: &'static [DeadlockRequestType] = &[ + DeadlockRequestType::Detect, + DeadlockRequestType::CleanUpWaitFor, + DeadlockRequestType::CleanUp, + ]; + VALUES + } } diff --git a/src/prost/wrapper_debugpb.rs b/src/prost/wrapper_debugpb.rs index b19ed83f1..9e10dd66c 100644 --- a/src/prost/wrapper_debugpb.rs +++ b/src/prost/wrapper_debugpb.rs @@ -1,1295 +1,2989 @@ // Generated file, please don't edit manually. impl GetRequest { -pub fn new_() -> GetRequest { ::std::default::Default::default() } -#[inline] pub fn clear_db(&mut self) { self.db = 0 } -#[inline] pub fn set_db_(&mut self, v: Db) { self.db = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_db(&self) -> Db { unsafe { ::std::mem::transmute::(self.db) } } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRequest = GetRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_db(&mut self) { + self.db = 0 + } + #[inline] + pub fn set_db_(&mut self, v: Db) { + self.db = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_db(&self) -> Db { + unsafe { ::std::mem::transmute::(self.db) } + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRequest = GetRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetResponse { -pub fn new_() -> GetResponse { ::std::default::Default::default() } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetResponse = GetResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetResponse = GetResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftLogRequest { -pub fn new_() -> RaftLogRequest { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn clear_log_index(&mut self) { self.log_index = 0 } -#[inline] pub fn set_log_index(&mut self, v: u64) { self.log_index = v; } -#[inline] pub fn get_log_index(&self) -> u64 { self.log_index } -} -impl ::protobuf::Clear for RaftLogRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftLogRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftLogRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftLogRequest = RaftLogRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RaftLogRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn clear_log_index(&mut self) { + self.log_index = 0 + } + #[inline] + pub fn set_log_index(&mut self, v: u64) { + self.log_index = v; + } + #[inline] + pub fn get_log_index(&self) -> u64 { + self.log_index + } +} +impl ::protobuf::Clear for RaftLogRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftLogRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftLogRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftLogRequest = RaftLogRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftLogResponse { -pub fn new_() -> RaftLogResponse { ::std::default::Default::default() } -#[inline] pub fn has_entry(&self) -> bool { self.entry.is_some() } -#[inline] pub fn clear_entry(&mut self) { self.entry = ::std::option::Option::None } -#[inline] pub fn set_entry(&mut self, v: super :: eraftpb :: Entry) { self.entry = ::std::option::Option::Some(v); } -#[inline] pub fn get_entry(&self) -> &super :: eraftpb :: Entry { match self.entry.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_entry(&mut self) -> &mut super :: eraftpb :: Entry { if self.entry.is_none() { - self.entry = ::std::option::Option::Some(super :: eraftpb :: Entry::default()); - } - self.entry.as_mut().unwrap() } -#[inline] pub fn take_entry(&mut self) -> super :: eraftpb :: Entry { self.entry.take().unwrap_or_else(super :: eraftpb :: Entry::default) } -} -impl ::protobuf::Clear for RaftLogResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftLogResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftLogResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftLogResponse = RaftLogResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RaftLogResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_entry(&self) -> bool { + self.entry.is_some() + } + #[inline] + pub fn clear_entry(&mut self) { + self.entry = ::std::option::Option::None + } + #[inline] + pub fn set_entry(&mut self, v: super::eraftpb::Entry) { + self.entry = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_entry(&self) -> &super::eraftpb::Entry { + match self.entry.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_entry(&mut self) -> &mut super::eraftpb::Entry { + if self.entry.is_none() { + self.entry = ::std::option::Option::Some(super::eraftpb::Entry::default()); + } + self.entry.as_mut().unwrap() + } + #[inline] + pub fn take_entry(&mut self) -> super::eraftpb::Entry { + self.entry + .take() + .unwrap_or_else(super::eraftpb::Entry::default) + } +} +impl ::protobuf::Clear for RaftLogResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftLogResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftLogResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftLogResponse = RaftLogResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionInfoRequest { -pub fn new_() -> RegionInfoRequest { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -} -impl ::protobuf::Clear for RegionInfoRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionInfoRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionInfoRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionInfoRequest = RegionInfoRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionInfoRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } +} +impl ::protobuf::Clear for RegionInfoRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionInfoRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionInfoRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionInfoRequest = RegionInfoRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionInfoResponse { -pub fn new_() -> RegionInfoResponse { ::std::default::Default::default() } -#[inline] pub fn has_raft_local_state(&self) -> bool { self.raft_local_state.is_some() } -#[inline] pub fn clear_raft_local_state(&mut self) { self.raft_local_state = ::std::option::Option::None } -#[inline] pub fn set_raft_local_state(&mut self, v: super :: raft_serverpb :: RaftLocalState) { self.raft_local_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_raft_local_state(&self) -> &super :: raft_serverpb :: RaftLocalState { match self.raft_local_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_raft_local_state(&mut self) -> &mut super :: raft_serverpb :: RaftLocalState { if self.raft_local_state.is_none() { - self.raft_local_state = ::std::option::Option::Some(super :: raft_serverpb :: RaftLocalState::default()); - } - self.raft_local_state.as_mut().unwrap() } -#[inline] pub fn take_raft_local_state(&mut self) -> super :: raft_serverpb :: RaftLocalState { self.raft_local_state.take().unwrap_or_else(super :: raft_serverpb :: RaftLocalState::default) } -#[inline] pub fn has_raft_apply_state(&self) -> bool { self.raft_apply_state.is_some() } -#[inline] pub fn clear_raft_apply_state(&mut self) { self.raft_apply_state = ::std::option::Option::None } -#[inline] pub fn set_raft_apply_state(&mut self, v: super :: raft_serverpb :: RaftApplyState) { self.raft_apply_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_raft_apply_state(&self) -> &super :: raft_serverpb :: RaftApplyState { match self.raft_apply_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_raft_apply_state(&mut self) -> &mut super :: raft_serverpb :: RaftApplyState { if self.raft_apply_state.is_none() { - self.raft_apply_state = ::std::option::Option::Some(super :: raft_serverpb :: RaftApplyState::default()); - } - self.raft_apply_state.as_mut().unwrap() } -#[inline] pub fn take_raft_apply_state(&mut self) -> super :: raft_serverpb :: RaftApplyState { self.raft_apply_state.take().unwrap_or_else(super :: raft_serverpb :: RaftApplyState::default) } -#[inline] pub fn has_region_local_state(&self) -> bool { self.region_local_state.is_some() } -#[inline] pub fn clear_region_local_state(&mut self) { self.region_local_state = ::std::option::Option::None } -#[inline] pub fn set_region_local_state(&mut self, v: super :: raft_serverpb :: RegionLocalState) { self.region_local_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_local_state(&self) -> &super :: raft_serverpb :: RegionLocalState { match self.region_local_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_local_state(&mut self) -> &mut super :: raft_serverpb :: RegionLocalState { if self.region_local_state.is_none() { - self.region_local_state = ::std::option::Option::Some(super :: raft_serverpb :: RegionLocalState::default()); - } - self.region_local_state.as_mut().unwrap() } -#[inline] pub fn take_region_local_state(&mut self) -> super :: raft_serverpb :: RegionLocalState { self.region_local_state.take().unwrap_or_else(super :: raft_serverpb :: RegionLocalState::default) } -} -impl ::protobuf::Clear for RegionInfoResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionInfoResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionInfoResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionInfoResponse = RegionInfoResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionInfoResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_raft_local_state(&self) -> bool { + self.raft_local_state.is_some() + } + #[inline] + pub fn clear_raft_local_state(&mut self) { + self.raft_local_state = ::std::option::Option::None + } + #[inline] + pub fn set_raft_local_state(&mut self, v: super::raft_serverpb::RaftLocalState) { + self.raft_local_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_raft_local_state(&self) -> &super::raft_serverpb::RaftLocalState { + match self.raft_local_state.as_ref() { + Some(v) => v, + None => { + ::default_instance() + } + } + } + #[inline] + pub fn mut_raft_local_state(&mut self) -> &mut super::raft_serverpb::RaftLocalState { + if self.raft_local_state.is_none() { + self.raft_local_state = + ::std::option::Option::Some(super::raft_serverpb::RaftLocalState::default()); + } + self.raft_local_state.as_mut().unwrap() + } + #[inline] + pub fn take_raft_local_state(&mut self) -> super::raft_serverpb::RaftLocalState { + self.raft_local_state + .take() + .unwrap_or_else(super::raft_serverpb::RaftLocalState::default) + } + #[inline] + pub fn has_raft_apply_state(&self) -> bool { + self.raft_apply_state.is_some() + } + #[inline] + pub fn clear_raft_apply_state(&mut self) { + self.raft_apply_state = ::std::option::Option::None + } + #[inline] + pub fn set_raft_apply_state(&mut self, v: super::raft_serverpb::RaftApplyState) { + self.raft_apply_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_raft_apply_state(&self) -> &super::raft_serverpb::RaftApplyState { + match self.raft_apply_state.as_ref() { + Some(v) => v, + None => { + ::default_instance() + } + } + } + #[inline] + pub fn mut_raft_apply_state(&mut self) -> &mut super::raft_serverpb::RaftApplyState { + if self.raft_apply_state.is_none() { + self.raft_apply_state = + ::std::option::Option::Some(super::raft_serverpb::RaftApplyState::default()); + } + self.raft_apply_state.as_mut().unwrap() + } + #[inline] + pub fn take_raft_apply_state(&mut self) -> super::raft_serverpb::RaftApplyState { + self.raft_apply_state + .take() + .unwrap_or_else(super::raft_serverpb::RaftApplyState::default) + } + #[inline] + pub fn has_region_local_state(&self) -> bool { + self.region_local_state.is_some() + } + #[inline] + pub fn clear_region_local_state(&mut self) { + self.region_local_state = ::std::option::Option::None + } + #[inline] + pub fn set_region_local_state(&mut self, v: super::raft_serverpb::RegionLocalState) { + self.region_local_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_local_state(&self) -> &super::raft_serverpb::RegionLocalState { + match self.region_local_state.as_ref() { + Some(v) => v, + None => { + ::default_instance() + } + } + } + #[inline] + pub fn mut_region_local_state(&mut self) -> &mut super::raft_serverpb::RegionLocalState { + if self.region_local_state.is_none() { + self.region_local_state = + ::std::option::Option::Some(super::raft_serverpb::RegionLocalState::default()); + } + self.region_local_state.as_mut().unwrap() + } + #[inline] + pub fn take_region_local_state(&mut self) -> super::raft_serverpb::RegionLocalState { + self.region_local_state + .take() + .unwrap_or_else(super::raft_serverpb::RegionLocalState::default) + } +} +impl ::protobuf::Clear for RegionInfoResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionInfoResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionInfoResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionInfoResponse = RegionInfoResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionSizeRequest { -pub fn new_() -> RegionSizeRequest { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn clear_cfs(&mut self) { self.cfs.clear(); } -#[inline] pub fn set_cfs(&mut self, v: :: std :: vec :: Vec < std :: string :: String >) { self.cfs = v; } -#[inline] pub fn get_cfs(&self) -> &:: std :: vec :: Vec < std :: string :: String > { &self.cfs } -#[inline] pub fn mut_cfs(&mut self) -> &mut :: std :: vec :: Vec < std :: string :: String > { &mut self.cfs } -#[inline] pub fn take_cfs(&mut self) -> :: std :: vec :: Vec < std :: string :: String > { ::std::mem::replace(&mut self.cfs, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for RegionSizeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionSizeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionSizeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionSizeRequest = RegionSizeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionSizeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn clear_cfs(&mut self) { + self.cfs.clear(); + } + #[inline] + pub fn set_cfs(&mut self, v: ::std::vec::Vec) { + self.cfs = v; + } + #[inline] + pub fn get_cfs(&self) -> &::std::vec::Vec { + &self.cfs + } + #[inline] + pub fn mut_cfs(&mut self) -> &mut ::std::vec::Vec { + &mut self.cfs + } + #[inline] + pub fn take_cfs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.cfs, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for RegionSizeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionSizeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionSizeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionSizeRequest = RegionSizeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionSizeResponse { -pub fn new_() -> RegionSizeResponse { ::std::default::Default::default() } -#[inline] pub fn clear_entries(&mut self) { self.entries.clear(); } -#[inline] pub fn set_entries(&mut self, v: :: std :: vec :: Vec < region_size_response :: Entry >) { self.entries = v; } -#[inline] pub fn get_entries(&self) -> &:: std :: vec :: Vec < region_size_response :: Entry > { &self.entries } -#[inline] pub fn mut_entries(&mut self) -> &mut :: std :: vec :: Vec < region_size_response :: Entry > { &mut self.entries } -#[inline] pub fn take_entries(&mut self) -> :: std :: vec :: Vec < region_size_response :: Entry > { ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for RegionSizeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionSizeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionSizeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionSizeResponse = RegionSizeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionSizeResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_entries(&mut self) { + self.entries.clear(); + } + #[inline] + pub fn set_entries(&mut self, v: ::std::vec::Vec) { + self.entries = v; + } + #[inline] + pub fn get_entries(&self) -> &::std::vec::Vec { + &self.entries + } + #[inline] + pub fn mut_entries(&mut self) -> &mut ::std::vec::Vec { + &mut self.entries + } + #[inline] + pub fn take_entries(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for RegionSizeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionSizeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionSizeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionSizeResponse = RegionSizeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl region_size_response::Entry { -pub fn new_() -> region_size_response::Entry { ::std::default::Default::default() } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_size(&mut self) { self.size = 0 } -#[inline] pub fn set_size(&mut self, v: u64) { self.size = v; } -#[inline] pub fn get_size(&self) -> u64 { self.size } -} -impl ::protobuf::Clear for region_size_response::Entry {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for region_size_response::Entry {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static region_size_response::Entry { - ::lazy_static::lazy_static! { - static ref INSTANCE: region_size_response::Entry = region_size_response::Entry::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> region_size_response::Entry { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_size(&mut self) { + self.size = 0 + } + #[inline] + pub fn set_size(&mut self, v: u64) { + self.size = v; + } + #[inline] + pub fn get_size(&self) -> u64 { + self.size + } +} +impl ::protobuf::Clear for region_size_response::Entry { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for region_size_response::Entry { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static region_size_response::Entry { + ::lazy_static::lazy_static! { + static ref INSTANCE: region_size_response::Entry = region_size_response::Entry::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanMvccRequest { -pub fn new_() -> ScanMvccRequest { ::std::default::Default::default() } -#[inline] pub fn clear_from_key(&mut self) { self.from_key.clear(); } -#[inline] pub fn set_from_key(&mut self, v: std :: vec :: Vec < u8 >) { self.from_key = v; } -#[inline] pub fn get_from_key(&self) -> &[u8] { &self.from_key } -#[inline] pub fn mut_from_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.from_key } -#[inline] pub fn take_from_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.from_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_to_key(&mut self) { self.to_key.clear(); } -#[inline] pub fn set_to_key(&mut self, v: std :: vec :: Vec < u8 >) { self.to_key = v; } -#[inline] pub fn get_to_key(&self) -> &[u8] { &self.to_key } -#[inline] pub fn mut_to_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.to_key } -#[inline] pub fn take_to_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.to_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_limit(&mut self) { self.limit = 0 } -#[inline] pub fn set_limit(&mut self, v: u64) { self.limit = v; } -#[inline] pub fn get_limit(&self) -> u64 { self.limit } -} -impl ::protobuf::Clear for ScanMvccRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanMvccRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanMvccRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanMvccRequest = ScanMvccRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanMvccRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_from_key(&mut self) { + self.from_key.clear(); + } + #[inline] + pub fn set_from_key(&mut self, v: std::vec::Vec) { + self.from_key = v; + } + #[inline] + pub fn get_from_key(&self) -> &[u8] { + &self.from_key + } + #[inline] + pub fn mut_from_key(&mut self) -> &mut std::vec::Vec { + &mut self.from_key + } + #[inline] + pub fn take_from_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.from_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_to_key(&mut self) { + self.to_key.clear(); + } + #[inline] + pub fn set_to_key(&mut self, v: std::vec::Vec) { + self.to_key = v; + } + #[inline] + pub fn get_to_key(&self) -> &[u8] { + &self.to_key + } + #[inline] + pub fn mut_to_key(&mut self) -> &mut std::vec::Vec { + &mut self.to_key + } + #[inline] + pub fn take_to_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.to_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_limit(&mut self) { + self.limit = 0 + } + #[inline] + pub fn set_limit(&mut self, v: u64) { + self.limit = v; + } + #[inline] + pub fn get_limit(&self) -> u64 { + self.limit + } +} +impl ::protobuf::Clear for ScanMvccRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanMvccRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanMvccRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanMvccRequest = ScanMvccRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanMvccResponse { -pub fn new_() -> ScanMvccResponse { ::std::default::Default::default() } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn has_info(&self) -> bool { self.info.is_some() } -#[inline] pub fn clear_info(&mut self) { self.info = ::std::option::Option::None } -#[inline] pub fn set_info(&mut self, v: super :: kvrpcpb :: MvccInfo) { self.info = ::std::option::Option::Some(v); } -#[inline] pub fn get_info(&self) -> &super :: kvrpcpb :: MvccInfo { match self.info.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_info(&mut self) -> &mut super :: kvrpcpb :: MvccInfo { if self.info.is_none() { - self.info = ::std::option::Option::Some(super :: kvrpcpb :: MvccInfo::default()); - } - self.info.as_mut().unwrap() } -#[inline] pub fn take_info(&mut self) -> super :: kvrpcpb :: MvccInfo { self.info.take().unwrap_or_else(super :: kvrpcpb :: MvccInfo::default) } -} -impl ::protobuf::Clear for ScanMvccResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanMvccResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanMvccResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanMvccResponse = ScanMvccResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanMvccResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_info(&self) -> bool { + self.info.is_some() + } + #[inline] + pub fn clear_info(&mut self) { + self.info = ::std::option::Option::None + } + #[inline] + pub fn set_info(&mut self, v: super::kvrpcpb::MvccInfo) { + self.info = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_info(&self) -> &super::kvrpcpb::MvccInfo { + match self.info.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_info(&mut self) -> &mut super::kvrpcpb::MvccInfo { + if self.info.is_none() { + self.info = ::std::option::Option::Some(super::kvrpcpb::MvccInfo::default()); + } + self.info.as_mut().unwrap() + } + #[inline] + pub fn take_info(&mut self) -> super::kvrpcpb::MvccInfo { + self.info + .take() + .unwrap_or_else(super::kvrpcpb::MvccInfo::default) + } +} +impl ::protobuf::Clear for ScanMvccResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanMvccResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanMvccResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanMvccResponse = ScanMvccResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactRequest { -pub fn new_() -> CompactRequest { ::std::default::Default::default() } -#[inline] pub fn clear_db(&mut self) { self.db = 0 } -#[inline] pub fn set_db_(&mut self, v: Db) { self.db = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_db(&self) -> Db { unsafe { ::std::mem::transmute::(self.db) } } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_from_key(&mut self) { self.from_key.clear(); } -#[inline] pub fn set_from_key(&mut self, v: std :: vec :: Vec < u8 >) { self.from_key = v; } -#[inline] pub fn get_from_key(&self) -> &[u8] { &self.from_key } -#[inline] pub fn mut_from_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.from_key } -#[inline] pub fn take_from_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.from_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_to_key(&mut self) { self.to_key.clear(); } -#[inline] pub fn set_to_key(&mut self, v: std :: vec :: Vec < u8 >) { self.to_key = v; } -#[inline] pub fn get_to_key(&self) -> &[u8] { &self.to_key } -#[inline] pub fn mut_to_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.to_key } -#[inline] pub fn take_to_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.to_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_threads(&mut self) { self.threads = 0 } -#[inline] pub fn set_threads(&mut self, v: u32) { self.threads = v; } -#[inline] pub fn get_threads(&self) -> u32 { self.threads } -#[inline] pub fn clear_bottommost_level_compaction(&mut self) { self.bottommost_level_compaction = 0 } -#[inline] pub fn set_bottommost_level_compaction_(&mut self, v: BottommostLevelCompaction) { self.bottommost_level_compaction = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_bottommost_level_compaction(&self) -> BottommostLevelCompaction { unsafe { ::std::mem::transmute::(self.bottommost_level_compaction) } } -} -impl ::protobuf::Clear for CompactRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CompactRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactRequest = CompactRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CompactRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_db(&mut self) { + self.db = 0 + } + #[inline] + pub fn set_db_(&mut self, v: Db) { + self.db = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_db(&self) -> Db { + unsafe { ::std::mem::transmute::(self.db) } + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_from_key(&mut self) { + self.from_key.clear(); + } + #[inline] + pub fn set_from_key(&mut self, v: std::vec::Vec) { + self.from_key = v; + } + #[inline] + pub fn get_from_key(&self) -> &[u8] { + &self.from_key + } + #[inline] + pub fn mut_from_key(&mut self) -> &mut std::vec::Vec { + &mut self.from_key + } + #[inline] + pub fn take_from_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.from_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_to_key(&mut self) { + self.to_key.clear(); + } + #[inline] + pub fn set_to_key(&mut self, v: std::vec::Vec) { + self.to_key = v; + } + #[inline] + pub fn get_to_key(&self) -> &[u8] { + &self.to_key + } + #[inline] + pub fn mut_to_key(&mut self) -> &mut std::vec::Vec { + &mut self.to_key + } + #[inline] + pub fn take_to_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.to_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_threads(&mut self) { + self.threads = 0 + } + #[inline] + pub fn set_threads(&mut self, v: u32) { + self.threads = v; + } + #[inline] + pub fn get_threads(&self) -> u32 { + self.threads + } + #[inline] + pub fn clear_bottommost_level_compaction(&mut self) { + self.bottommost_level_compaction = 0 + } + #[inline] + pub fn set_bottommost_level_compaction_(&mut self, v: BottommostLevelCompaction) { + self.bottommost_level_compaction = + unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_bottommost_level_compaction(&self) -> BottommostLevelCompaction { + unsafe { + ::std::mem::transmute::( + self.bottommost_level_compaction, + ) + } + } +} +impl ::protobuf::Clear for CompactRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CompactRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactRequest = CompactRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactResponse { -pub fn new_() -> CompactResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for CompactResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CompactResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactResponse = CompactResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CompactResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for CompactResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CompactResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactResponse = CompactResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl InjectFailPointRequest { -pub fn new_() -> InjectFailPointRequest { ::std::default::Default::default() } -#[inline] pub fn clear_name(&mut self) { self.name.clear(); } -#[inline] pub fn set_name(&mut self, v: std :: string :: String) { self.name = v; } -#[inline] pub fn get_name(&self) -> &str { &self.name } -#[inline] pub fn mut_name(&mut self) -> &mut std :: string :: String { &mut self.name } -#[inline] pub fn take_name(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.name, ::std::string::String::new()) } -#[inline] pub fn clear_actions(&mut self) { self.actions.clear(); } -#[inline] pub fn set_actions(&mut self, v: std :: string :: String) { self.actions = v; } -#[inline] pub fn get_actions(&self) -> &str { &self.actions } -#[inline] pub fn mut_actions(&mut self) -> &mut std :: string :: String { &mut self.actions } -#[inline] pub fn take_actions(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.actions, ::std::string::String::new()) } -} -impl ::protobuf::Clear for InjectFailPointRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for InjectFailPointRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static InjectFailPointRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: InjectFailPointRequest = InjectFailPointRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> InjectFailPointRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_name(&mut self) { + self.name.clear(); + } + #[inline] + pub fn set_name(&mut self, v: std::string::String) { + self.name = v; + } + #[inline] + pub fn get_name(&self) -> &str { + &self.name + } + #[inline] + pub fn mut_name(&mut self) -> &mut std::string::String { + &mut self.name + } + #[inline] + pub fn take_name(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } + #[inline] + pub fn clear_actions(&mut self) { + self.actions.clear(); + } + #[inline] + pub fn set_actions(&mut self, v: std::string::String) { + self.actions = v; + } + #[inline] + pub fn get_actions(&self) -> &str { + &self.actions + } + #[inline] + pub fn mut_actions(&mut self) -> &mut std::string::String { + &mut self.actions + } + #[inline] + pub fn take_actions(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.actions, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for InjectFailPointRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for InjectFailPointRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static InjectFailPointRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: InjectFailPointRequest = InjectFailPointRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl InjectFailPointResponse { -pub fn new_() -> InjectFailPointResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for InjectFailPointResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for InjectFailPointResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static InjectFailPointResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: InjectFailPointResponse = InjectFailPointResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> InjectFailPointResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for InjectFailPointResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for InjectFailPointResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static InjectFailPointResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: InjectFailPointResponse = InjectFailPointResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RecoverFailPointRequest { -pub fn new_() -> RecoverFailPointRequest { ::std::default::Default::default() } -#[inline] pub fn clear_name(&mut self) { self.name.clear(); } -#[inline] pub fn set_name(&mut self, v: std :: string :: String) { self.name = v; } -#[inline] pub fn get_name(&self) -> &str { &self.name } -#[inline] pub fn mut_name(&mut self) -> &mut std :: string :: String { &mut self.name } -#[inline] pub fn take_name(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.name, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RecoverFailPointRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RecoverFailPointRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RecoverFailPointRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RecoverFailPointRequest = RecoverFailPointRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RecoverFailPointRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_name(&mut self) { + self.name.clear(); + } + #[inline] + pub fn set_name(&mut self, v: std::string::String) { + self.name = v; + } + #[inline] + pub fn get_name(&self) -> &str { + &self.name + } + #[inline] + pub fn mut_name(&mut self) -> &mut std::string::String { + &mut self.name + } + #[inline] + pub fn take_name(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RecoverFailPointRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RecoverFailPointRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RecoverFailPointRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RecoverFailPointRequest = RecoverFailPointRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RecoverFailPointResponse { -pub fn new_() -> RecoverFailPointResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for RecoverFailPointResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RecoverFailPointResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RecoverFailPointResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RecoverFailPointResponse = RecoverFailPointResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RecoverFailPointResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for RecoverFailPointResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RecoverFailPointResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RecoverFailPointResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RecoverFailPointResponse = RecoverFailPointResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ListFailPointsRequest { -pub fn new_() -> ListFailPointsRequest { ::std::default::Default::default() } -} -impl ::protobuf::Clear for ListFailPointsRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ListFailPointsRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ListFailPointsRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ListFailPointsRequest = ListFailPointsRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ListFailPointsRequest { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for ListFailPointsRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ListFailPointsRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ListFailPointsRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ListFailPointsRequest = ListFailPointsRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ListFailPointsResponse { -pub fn new_() -> ListFailPointsResponse { ::std::default::Default::default() } -#[inline] pub fn clear_entries(&mut self) { self.entries.clear(); } -#[inline] pub fn set_entries(&mut self, v: :: std :: vec :: Vec < list_fail_points_response :: Entry >) { self.entries = v; } -#[inline] pub fn get_entries(&self) -> &:: std :: vec :: Vec < list_fail_points_response :: Entry > { &self.entries } -#[inline] pub fn mut_entries(&mut self) -> &mut :: std :: vec :: Vec < list_fail_points_response :: Entry > { &mut self.entries } -#[inline] pub fn take_entries(&mut self) -> :: std :: vec :: Vec < list_fail_points_response :: Entry > { ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for ListFailPointsResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ListFailPointsResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ListFailPointsResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ListFailPointsResponse = ListFailPointsResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ListFailPointsResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_entries(&mut self) { + self.entries.clear(); + } + #[inline] + pub fn set_entries(&mut self, v: ::std::vec::Vec) { + self.entries = v; + } + #[inline] + pub fn get_entries(&self) -> &::std::vec::Vec { + &self.entries + } + #[inline] + pub fn mut_entries(&mut self) -> &mut ::std::vec::Vec { + &mut self.entries + } + #[inline] + pub fn take_entries(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for ListFailPointsResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ListFailPointsResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ListFailPointsResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ListFailPointsResponse = ListFailPointsResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl list_fail_points_response::Entry { -pub fn new_() -> list_fail_points_response::Entry { ::std::default::Default::default() } -#[inline] pub fn clear_name(&mut self) { self.name.clear(); } -#[inline] pub fn set_name(&mut self, v: std :: string :: String) { self.name = v; } -#[inline] pub fn get_name(&self) -> &str { &self.name } -#[inline] pub fn mut_name(&mut self) -> &mut std :: string :: String { &mut self.name } -#[inline] pub fn take_name(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.name, ::std::string::String::new()) } -#[inline] pub fn clear_actions(&mut self) { self.actions.clear(); } -#[inline] pub fn set_actions(&mut self, v: std :: string :: String) { self.actions = v; } -#[inline] pub fn get_actions(&self) -> &str { &self.actions } -#[inline] pub fn mut_actions(&mut self) -> &mut std :: string :: String { &mut self.actions } -#[inline] pub fn take_actions(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.actions, ::std::string::String::new()) } -} -impl ::protobuf::Clear for list_fail_points_response::Entry {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for list_fail_points_response::Entry {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static list_fail_points_response::Entry { - ::lazy_static::lazy_static! { - static ref INSTANCE: list_fail_points_response::Entry = list_fail_points_response::Entry::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> list_fail_points_response::Entry { + ::std::default::Default::default() + } + #[inline] + pub fn clear_name(&mut self) { + self.name.clear(); + } + #[inline] + pub fn set_name(&mut self, v: std::string::String) { + self.name = v; + } + #[inline] + pub fn get_name(&self) -> &str { + &self.name + } + #[inline] + pub fn mut_name(&mut self) -> &mut std::string::String { + &mut self.name + } + #[inline] + pub fn take_name(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } + #[inline] + pub fn clear_actions(&mut self) { + self.actions.clear(); + } + #[inline] + pub fn set_actions(&mut self, v: std::string::String) { + self.actions = v; + } + #[inline] + pub fn get_actions(&self) -> &str { + &self.actions + } + #[inline] + pub fn mut_actions(&mut self) -> &mut std::string::String { + &mut self.actions + } + #[inline] + pub fn take_actions(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.actions, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for list_fail_points_response::Entry { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for list_fail_points_response::Entry { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static list_fail_points_response::Entry { + ::lazy_static::lazy_static! { + static ref INSTANCE: list_fail_points_response::Entry = list_fail_points_response::Entry::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetMetricsRequest { -pub fn new_() -> GetMetricsRequest { ::std::default::Default::default() } -#[inline] pub fn clear_all(&mut self) { self.all = false } -#[inline] pub fn set_all(&mut self, v: bool) { self.all = v; } -#[inline] pub fn get_all(&self) -> bool { self.all } -} -impl ::protobuf::Clear for GetMetricsRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetMetricsRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetMetricsRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetMetricsRequest = GetMetricsRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetMetricsRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_all(&mut self) { + self.all = false + } + #[inline] + pub fn set_all(&mut self, v: bool) { + self.all = v; + } + #[inline] + pub fn get_all(&self) -> bool { + self.all + } +} +impl ::protobuf::Clear for GetMetricsRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetMetricsRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetMetricsRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetMetricsRequest = GetMetricsRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetMetricsResponse { -pub fn new_() -> GetMetricsResponse { ::std::default::Default::default() } -#[inline] pub fn clear_prometheus(&mut self) { self.prometheus.clear(); } -#[inline] pub fn set_prometheus(&mut self, v: std :: string :: String) { self.prometheus = v; } -#[inline] pub fn get_prometheus(&self) -> &str { &self.prometheus } -#[inline] pub fn mut_prometheus(&mut self) -> &mut std :: string :: String { &mut self.prometheus } -#[inline] pub fn take_prometheus(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.prometheus, ::std::string::String::new()) } -#[inline] pub fn clear_rocksdb_kv(&mut self) { self.rocksdb_kv.clear(); } -#[inline] pub fn set_rocksdb_kv(&mut self, v: std :: string :: String) { self.rocksdb_kv = v; } -#[inline] pub fn get_rocksdb_kv(&self) -> &str { &self.rocksdb_kv } -#[inline] pub fn mut_rocksdb_kv(&mut self) -> &mut std :: string :: String { &mut self.rocksdb_kv } -#[inline] pub fn take_rocksdb_kv(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.rocksdb_kv, ::std::string::String::new()) } -#[inline] pub fn clear_rocksdb_raft(&mut self) { self.rocksdb_raft.clear(); } -#[inline] pub fn set_rocksdb_raft(&mut self, v: std :: string :: String) { self.rocksdb_raft = v; } -#[inline] pub fn get_rocksdb_raft(&self) -> &str { &self.rocksdb_raft } -#[inline] pub fn mut_rocksdb_raft(&mut self) -> &mut std :: string :: String { &mut self.rocksdb_raft } -#[inline] pub fn take_rocksdb_raft(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.rocksdb_raft, ::std::string::String::new()) } -#[inline] pub fn clear_jemalloc(&mut self) { self.jemalloc.clear(); } -#[inline] pub fn set_jemalloc(&mut self, v: std :: string :: String) { self.jemalloc = v; } -#[inline] pub fn get_jemalloc(&self) -> &str { &self.jemalloc } -#[inline] pub fn mut_jemalloc(&mut self) -> &mut std :: string :: String { &mut self.jemalloc } -#[inline] pub fn take_jemalloc(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.jemalloc, ::std::string::String::new()) } -#[inline] pub fn clear_store_id(&mut self) { self.store_id = 0 } -#[inline] pub fn set_store_id(&mut self, v: u64) { self.store_id = v; } -#[inline] pub fn get_store_id(&self) -> u64 { self.store_id } -} -impl ::protobuf::Clear for GetMetricsResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetMetricsResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetMetricsResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetMetricsResponse = GetMetricsResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetMetricsResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_prometheus(&mut self) { + self.prometheus.clear(); + } + #[inline] + pub fn set_prometheus(&mut self, v: std::string::String) { + self.prometheus = v; + } + #[inline] + pub fn get_prometheus(&self) -> &str { + &self.prometheus + } + #[inline] + pub fn mut_prometheus(&mut self) -> &mut std::string::String { + &mut self.prometheus + } + #[inline] + pub fn take_prometheus(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.prometheus, ::std::string::String::new()) + } + #[inline] + pub fn clear_rocksdb_kv(&mut self) { + self.rocksdb_kv.clear(); + } + #[inline] + pub fn set_rocksdb_kv(&mut self, v: std::string::String) { + self.rocksdb_kv = v; + } + #[inline] + pub fn get_rocksdb_kv(&self) -> &str { + &self.rocksdb_kv + } + #[inline] + pub fn mut_rocksdb_kv(&mut self) -> &mut std::string::String { + &mut self.rocksdb_kv + } + #[inline] + pub fn take_rocksdb_kv(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.rocksdb_kv, ::std::string::String::new()) + } + #[inline] + pub fn clear_rocksdb_raft(&mut self) { + self.rocksdb_raft.clear(); + } + #[inline] + pub fn set_rocksdb_raft(&mut self, v: std::string::String) { + self.rocksdb_raft = v; + } + #[inline] + pub fn get_rocksdb_raft(&self) -> &str { + &self.rocksdb_raft + } + #[inline] + pub fn mut_rocksdb_raft(&mut self) -> &mut std::string::String { + &mut self.rocksdb_raft + } + #[inline] + pub fn take_rocksdb_raft(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.rocksdb_raft, ::std::string::String::new()) + } + #[inline] + pub fn clear_jemalloc(&mut self) { + self.jemalloc.clear(); + } + #[inline] + pub fn set_jemalloc(&mut self, v: std::string::String) { + self.jemalloc = v; + } + #[inline] + pub fn get_jemalloc(&self) -> &str { + &self.jemalloc + } + #[inline] + pub fn mut_jemalloc(&mut self) -> &mut std::string::String { + &mut self.jemalloc + } + #[inline] + pub fn take_jemalloc(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.jemalloc, ::std::string::String::new()) + } + #[inline] + pub fn clear_store_id(&mut self) { + self.store_id = 0 + } + #[inline] + pub fn set_store_id(&mut self, v: u64) { + self.store_id = v; + } + #[inline] + pub fn get_store_id(&self) -> u64 { + self.store_id + } +} +impl ::protobuf::Clear for GetMetricsResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetMetricsResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetMetricsResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetMetricsResponse = GetMetricsResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionConsistencyCheckRequest { -pub fn new_() -> RegionConsistencyCheckRequest { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -} -impl ::protobuf::Clear for RegionConsistencyCheckRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionConsistencyCheckRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionConsistencyCheckRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionConsistencyCheckRequest = RegionConsistencyCheckRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionConsistencyCheckRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } +} +impl ::protobuf::Clear for RegionConsistencyCheckRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionConsistencyCheckRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionConsistencyCheckRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionConsistencyCheckRequest = RegionConsistencyCheckRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionConsistencyCheckResponse { -pub fn new_() -> RegionConsistencyCheckResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for RegionConsistencyCheckResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionConsistencyCheckResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionConsistencyCheckResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionConsistencyCheckResponse = RegionConsistencyCheckResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionConsistencyCheckResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for RegionConsistencyCheckResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionConsistencyCheckResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionConsistencyCheckResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionConsistencyCheckResponse = RegionConsistencyCheckResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ModifyTikvConfigRequest { -pub fn new_() -> ModifyTikvConfigRequest { ::std::default::Default::default() } -#[inline] pub fn clear_module(&mut self) { self.module = 0 } -#[inline] pub fn set_module_(&mut self, v: Module) { self.module = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_module(&self) -> Module { unsafe { ::std::mem::transmute::(self.module) } } -#[inline] pub fn clear_config_name(&mut self) { self.config_name.clear(); } -#[inline] pub fn set_config_name(&mut self, v: std :: string :: String) { self.config_name = v; } -#[inline] pub fn get_config_name(&self) -> &str { &self.config_name } -#[inline] pub fn mut_config_name(&mut self) -> &mut std :: string :: String { &mut self.config_name } -#[inline] pub fn take_config_name(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.config_name, ::std::string::String::new()) } -#[inline] pub fn clear_config_value(&mut self) { self.config_value.clear(); } -#[inline] pub fn set_config_value(&mut self, v: std :: string :: String) { self.config_value = v; } -#[inline] pub fn get_config_value(&self) -> &str { &self.config_value } -#[inline] pub fn mut_config_value(&mut self) -> &mut std :: string :: String { &mut self.config_value } -#[inline] pub fn take_config_value(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.config_value, ::std::string::String::new()) } -} -impl ::protobuf::Clear for ModifyTikvConfigRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ModifyTikvConfigRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ModifyTikvConfigRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ModifyTikvConfigRequest = ModifyTikvConfigRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ModifyTikvConfigRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_module(&mut self) { + self.module = 0 + } + #[inline] + pub fn set_module_(&mut self, v: Module) { + self.module = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_module(&self) -> Module { + unsafe { ::std::mem::transmute::(self.module) } + } + #[inline] + pub fn clear_config_name(&mut self) { + self.config_name.clear(); + } + #[inline] + pub fn set_config_name(&mut self, v: std::string::String) { + self.config_name = v; + } + #[inline] + pub fn get_config_name(&self) -> &str { + &self.config_name + } + #[inline] + pub fn mut_config_name(&mut self) -> &mut std::string::String { + &mut self.config_name + } + #[inline] + pub fn take_config_name(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.config_name, ::std::string::String::new()) + } + #[inline] + pub fn clear_config_value(&mut self) { + self.config_value.clear(); + } + #[inline] + pub fn set_config_value(&mut self, v: std::string::String) { + self.config_value = v; + } + #[inline] + pub fn get_config_value(&self) -> &str { + &self.config_value + } + #[inline] + pub fn mut_config_value(&mut self) -> &mut std::string::String { + &mut self.config_value + } + #[inline] + pub fn take_config_value(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.config_value, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for ModifyTikvConfigRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ModifyTikvConfigRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ModifyTikvConfigRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ModifyTikvConfigRequest = ModifyTikvConfigRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ModifyTikvConfigResponse { -pub fn new_() -> ModifyTikvConfigResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for ModifyTikvConfigResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ModifyTikvConfigResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ModifyTikvConfigResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ModifyTikvConfigResponse = ModifyTikvConfigResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ModifyTikvConfigResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for ModifyTikvConfigResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ModifyTikvConfigResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ModifyTikvConfigResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ModifyTikvConfigResponse = ModifyTikvConfigResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Property { -pub fn new_() -> Property { ::std::default::Default::default() } -#[inline] pub fn clear_name(&mut self) { self.name.clear(); } -#[inline] pub fn set_name(&mut self, v: std :: string :: String) { self.name = v; } -#[inline] pub fn get_name(&self) -> &str { &self.name } -#[inline] pub fn mut_name(&mut self) -> &mut std :: string :: String { &mut self.name } -#[inline] pub fn take_name(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.name, ::std::string::String::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: string :: String) { self.value = v; } -#[inline] pub fn get_value(&self) -> &str { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: string :: String { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.value, ::std::string::String::new()) } -} -impl ::protobuf::Clear for Property {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Property {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Property { - ::lazy_static::lazy_static! { - static ref INSTANCE: Property = Property::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Property { + ::std::default::Default::default() + } + #[inline] + pub fn clear_name(&mut self) { + self.name.clear(); + } + #[inline] + pub fn set_name(&mut self, v: std::string::String) { + self.name = v; + } + #[inline] + pub fn get_name(&self) -> &str { + &self.name + } + #[inline] + pub fn mut_name(&mut self) -> &mut std::string::String { + &mut self.name + } + #[inline] + pub fn take_name(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::string::String) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &str { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::string::String { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.value, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for Property { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Property { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Property { + ::lazy_static::lazy_static! { + static ref INSTANCE: Property = Property::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetRegionPropertiesRequest { -pub fn new_() -> GetRegionPropertiesRequest { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -} -impl ::protobuf::Clear for GetRegionPropertiesRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRegionPropertiesRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRegionPropertiesRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRegionPropertiesRequest = GetRegionPropertiesRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRegionPropertiesRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } +} +impl ::protobuf::Clear for GetRegionPropertiesRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRegionPropertiesRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRegionPropertiesRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRegionPropertiesRequest = GetRegionPropertiesRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetRegionPropertiesResponse { -pub fn new_() -> GetRegionPropertiesResponse { ::std::default::Default::default() } -#[inline] pub fn clear_props(&mut self) { self.props.clear(); } -#[inline] pub fn set_props(&mut self, v: :: std :: vec :: Vec < Property >) { self.props = v; } -#[inline] pub fn get_props(&self) -> &:: std :: vec :: Vec < Property > { &self.props } -#[inline] pub fn mut_props(&mut self) -> &mut :: std :: vec :: Vec < Property > { &mut self.props } -#[inline] pub fn take_props(&mut self) -> :: std :: vec :: Vec < Property > { ::std::mem::replace(&mut self.props, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetRegionPropertiesResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRegionPropertiesResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRegionPropertiesResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRegionPropertiesResponse = GetRegionPropertiesResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRegionPropertiesResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_props(&mut self) { + self.props.clear(); + } + #[inline] + pub fn set_props(&mut self, v: ::std::vec::Vec) { + self.props = v; + } + #[inline] + pub fn get_props(&self) -> &::std::vec::Vec { + &self.props + } + #[inline] + pub fn mut_props(&mut self) -> &mut ::std::vec::Vec { + &mut self.props + } + #[inline] + pub fn take_props(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.props, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetRegionPropertiesResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRegionPropertiesResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRegionPropertiesResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRegionPropertiesResponse = GetRegionPropertiesResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Db { -pub fn values() -> &'static [Self] { -static VALUES: &'static [Db] = &[ -Db::Invalid, -Db::Kv, -Db::Raft, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [Db] = &[Db::Invalid, Db::Kv, Db::Raft]; + VALUES + } } impl Module { -pub fn values() -> &'static [Self] { -static VALUES: &'static [Module] = &[ -Module::Unused, -Module::Kvdb, -Module::Raftdb, -Module::Readpool, -Module::Server, -Module::Storage, -Module::Pd, -Module::Metric, -Module::Coprocessor, -Module::Security, -Module::Import, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [Module] = &[ + Module::Unused, + Module::Kvdb, + Module::Raftdb, + Module::Readpool, + Module::Server, + Module::Storage, + Module::Pd, + Module::Metric, + Module::Coprocessor, + Module::Security, + Module::Import, + ]; + VALUES + } } impl BottommostLevelCompaction { -pub fn values() -> &'static [Self] { -static VALUES: &'static [BottommostLevelCompaction] = &[ -BottommostLevelCompaction::Skip, -BottommostLevelCompaction::Force, -BottommostLevelCompaction::IfHaveCompactionFilter, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [BottommostLevelCompaction] = &[ + BottommostLevelCompaction::Skip, + BottommostLevelCompaction::Force, + BottommostLevelCompaction::IfHaveCompactionFilter, + ]; + VALUES + } } diff --git a/src/prost/wrapper_enginepb.rs b/src/prost/wrapper_enginepb.rs index 75d3a44d2..10964d935 100644 --- a/src/prost/wrapper_enginepb.rs +++ b/src/prost/wrapper_enginepb.rs @@ -1,505 +1,1204 @@ // Generated file, please don't edit manually. impl CommandRequestHeader { -pub fn new_() -> CommandRequestHeader { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn clear_index(&mut self) { self.index = 0 } -#[inline] pub fn set_index(&mut self, v: u64) { self.index = v; } -#[inline] pub fn get_index(&self) -> u64 { self.index } -#[inline] pub fn clear_term(&mut self) { self.term = 0 } -#[inline] pub fn set_term(&mut self, v: u64) { self.term = v; } -#[inline] pub fn get_term(&self) -> u64 { self.term } -#[inline] pub fn clear_sync_log(&mut self) { self.sync_log = false } -#[inline] pub fn set_sync_log(&mut self, v: bool) { self.sync_log = v; } -#[inline] pub fn get_sync_log(&self) -> bool { self.sync_log } -#[inline] pub fn clear_destroy(&mut self) { self.destroy = false } -#[inline] pub fn set_destroy(&mut self, v: bool) { self.destroy = v; } -#[inline] pub fn get_destroy(&self) -> bool { self.destroy } -#[inline] pub fn clear_context(&mut self) { self.context.clear(); } -#[inline] pub fn set_context(&mut self, v: std :: vec :: Vec < u8 >) { self.context = v; } -#[inline] pub fn get_context(&self) -> &[u8] { &self.context } -#[inline] pub fn mut_context(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.context } -#[inline] pub fn take_context(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.context, ::std::vec::Vec::new()) } + pub fn new_() -> CommandRequestHeader { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn clear_index(&mut self) { + self.index = 0 + } + #[inline] + pub fn set_index(&mut self, v: u64) { + self.index = v; + } + #[inline] + pub fn get_index(&self) -> u64 { + self.index + } + #[inline] + pub fn clear_term(&mut self) { + self.term = 0 + } + #[inline] + pub fn set_term(&mut self, v: u64) { + self.term = v; + } + #[inline] + pub fn get_term(&self) -> u64 { + self.term + } + #[inline] + pub fn clear_sync_log(&mut self) { + self.sync_log = false + } + #[inline] + pub fn set_sync_log(&mut self, v: bool) { + self.sync_log = v; + } + #[inline] + pub fn get_sync_log(&self) -> bool { + self.sync_log + } + #[inline] + pub fn clear_destroy(&mut self) { + self.destroy = false + } + #[inline] + pub fn set_destroy(&mut self, v: bool) { + self.destroy = v; + } + #[inline] + pub fn get_destroy(&self) -> bool { + self.destroy + } + #[inline] + pub fn clear_context(&mut self) { + self.context.clear(); + } + #[inline] + pub fn set_context(&mut self, v: std::vec::Vec) { + self.context = v; + } + #[inline] + pub fn get_context(&self) -> &[u8] { + &self.context + } + #[inline] + pub fn mut_context(&mut self) -> &mut std::vec::Vec { + &mut self.context + } + #[inline] + pub fn take_context(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.context, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for CommandRequestHeader {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CommandRequestHeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CommandRequestHeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommandRequestHeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommandRequestHeader = CommandRequestHeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for CommandRequestHeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommandRequestHeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommandRequestHeader = CommandRequestHeader::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl CommandRequest { -pub fn new_() -> CommandRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: CommandRequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &CommandRequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut CommandRequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(CommandRequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> CommandRequestHeader { self.header.take().unwrap_or_else(CommandRequestHeader::default) } -#[inline] pub fn clear_requests(&mut self) { self.requests.clear(); } -#[inline] pub fn set_requests(&mut self, v: :: std :: vec :: Vec < super :: raft_cmdpb :: Request >) { self.requests = v; } -#[inline] pub fn get_requests(&self) -> &:: std :: vec :: Vec < super :: raft_cmdpb :: Request > { &self.requests } -#[inline] pub fn mut_requests(&mut self) -> &mut :: std :: vec :: Vec < super :: raft_cmdpb :: Request > { &mut self.requests } -#[inline] pub fn take_requests(&mut self) -> :: std :: vec :: Vec < super :: raft_cmdpb :: Request > { ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) } -#[inline] pub fn has_admin_request(&self) -> bool { self.admin_request.is_some() } -#[inline] pub fn clear_admin_request(&mut self) { self.admin_request = ::std::option::Option::None } -#[inline] pub fn set_admin_request(&mut self, v: super :: raft_cmdpb :: AdminRequest) { self.admin_request = ::std::option::Option::Some(v); } -#[inline] pub fn get_admin_request(&self) -> &super :: raft_cmdpb :: AdminRequest { match self.admin_request.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_admin_request(&mut self) -> &mut super :: raft_cmdpb :: AdminRequest { if self.admin_request.is_none() { - self.admin_request = ::std::option::Option::Some(super :: raft_cmdpb :: AdminRequest::default()); - } - self.admin_request.as_mut().unwrap() } -#[inline] pub fn take_admin_request(&mut self) -> super :: raft_cmdpb :: AdminRequest { self.admin_request.take().unwrap_or_else(super :: raft_cmdpb :: AdminRequest::default) } -#[inline] pub fn has_admin_response(&self) -> bool { self.admin_response.is_some() } -#[inline] pub fn clear_admin_response(&mut self) { self.admin_response = ::std::option::Option::None } -#[inline] pub fn set_admin_response(&mut self, v: super :: raft_cmdpb :: AdminResponse) { self.admin_response = ::std::option::Option::Some(v); } -#[inline] pub fn get_admin_response(&self) -> &super :: raft_cmdpb :: AdminResponse { match self.admin_response.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_admin_response(&mut self) -> &mut super :: raft_cmdpb :: AdminResponse { if self.admin_response.is_none() { - self.admin_response = ::std::option::Option::Some(super :: raft_cmdpb :: AdminResponse::default()); - } - self.admin_response.as_mut().unwrap() } -#[inline] pub fn take_admin_response(&mut self) -> super :: raft_cmdpb :: AdminResponse { self.admin_response.take().unwrap_or_else(super :: raft_cmdpb :: AdminResponse::default) } + pub fn new_() -> CommandRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: CommandRequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &CommandRequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut CommandRequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(CommandRequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> CommandRequestHeader { + self.header + .take() + .unwrap_or_else(CommandRequestHeader::default) + } + #[inline] + pub fn clear_requests(&mut self) { + self.requests.clear(); + } + #[inline] + pub fn set_requests(&mut self, v: ::std::vec::Vec) { + self.requests = v; + } + #[inline] + pub fn get_requests(&self) -> &::std::vec::Vec { + &self.requests + } + #[inline] + pub fn mut_requests(&mut self) -> &mut ::std::vec::Vec { + &mut self.requests + } + #[inline] + pub fn take_requests(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_admin_request(&self) -> bool { + self.admin_request.is_some() + } + #[inline] + pub fn clear_admin_request(&mut self) { + self.admin_request = ::std::option::Option::None + } + #[inline] + pub fn set_admin_request(&mut self, v: super::raft_cmdpb::AdminRequest) { + self.admin_request = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_admin_request(&self) -> &super::raft_cmdpb::AdminRequest { + match self.admin_request.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_admin_request(&mut self) -> &mut super::raft_cmdpb::AdminRequest { + if self.admin_request.is_none() { + self.admin_request = + ::std::option::Option::Some(super::raft_cmdpb::AdminRequest::default()); + } + self.admin_request.as_mut().unwrap() + } + #[inline] + pub fn take_admin_request(&mut self) -> super::raft_cmdpb::AdminRequest { + self.admin_request + .take() + .unwrap_or_else(super::raft_cmdpb::AdminRequest::default) + } + #[inline] + pub fn has_admin_response(&self) -> bool { + self.admin_response.is_some() + } + #[inline] + pub fn clear_admin_response(&mut self) { + self.admin_response = ::std::option::Option::None + } + #[inline] + pub fn set_admin_response(&mut self, v: super::raft_cmdpb::AdminResponse) { + self.admin_response = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_admin_response(&self) -> &super::raft_cmdpb::AdminResponse { + match self.admin_response.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_admin_response(&mut self) -> &mut super::raft_cmdpb::AdminResponse { + if self.admin_response.is_none() { + self.admin_response = + ::std::option::Option::Some(super::raft_cmdpb::AdminResponse::default()); + } + self.admin_response.as_mut().unwrap() + } + #[inline] + pub fn take_admin_response(&mut self) -> super::raft_cmdpb::AdminResponse { + self.admin_response + .take() + .unwrap_or_else(super::raft_cmdpb::AdminResponse::default) + } } -impl ::protobuf::Clear for CommandRequest {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CommandRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CommandRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommandRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommandRequest = CommandRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for CommandRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommandRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommandRequest = CommandRequest::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl CommandRequestBatch { -pub fn new_() -> CommandRequestBatch { ::std::default::Default::default() } -#[inline] pub fn clear_requests(&mut self) { self.requests.clear(); } -#[inline] pub fn set_requests(&mut self, v: :: std :: vec :: Vec < CommandRequest >) { self.requests = v; } -#[inline] pub fn get_requests(&self) -> &:: std :: vec :: Vec < CommandRequest > { &self.requests } -#[inline] pub fn mut_requests(&mut self) -> &mut :: std :: vec :: Vec < CommandRequest > { &mut self.requests } -#[inline] pub fn take_requests(&mut self) -> :: std :: vec :: Vec < CommandRequest > { ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) } + pub fn new_() -> CommandRequestBatch { + ::std::default::Default::default() + } + #[inline] + pub fn clear_requests(&mut self) { + self.requests.clear(); + } + #[inline] + pub fn set_requests(&mut self, v: ::std::vec::Vec) { + self.requests = v; + } + #[inline] + pub fn get_requests(&self) -> &::std::vec::Vec { + &self.requests + } + #[inline] + pub fn mut_requests(&mut self) -> &mut ::std::vec::Vec { + &mut self.requests + } + #[inline] + pub fn take_requests(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for CommandRequestBatch {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CommandRequestBatch { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CommandRequestBatch {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommandRequestBatch { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommandRequestBatch = CommandRequestBatch::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for CommandRequestBatch { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommandRequestBatch { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommandRequestBatch = CommandRequestBatch::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CommandResponseHeader { -pub fn new_() -> CommandResponseHeader { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn clear_destroyed(&mut self) { self.destroyed = false } -#[inline] pub fn set_destroyed(&mut self, v: bool) { self.destroyed = v; } -#[inline] pub fn get_destroyed(&self) -> bool { self.destroyed } + pub fn new_() -> CommandResponseHeader { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn clear_destroyed(&mut self) { + self.destroyed = false + } + #[inline] + pub fn set_destroyed(&mut self, v: bool) { + self.destroyed = v; + } + #[inline] + pub fn get_destroyed(&self) -> bool { + self.destroyed + } } -impl ::protobuf::Clear for CommandResponseHeader {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CommandResponseHeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CommandResponseHeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommandResponseHeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommandResponseHeader = CommandResponseHeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for CommandResponseHeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommandResponseHeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommandResponseHeader = CommandResponseHeader::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl CommandResponse { -pub fn new_() -> CommandResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: CommandResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &CommandResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut CommandResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(CommandResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> CommandResponseHeader { self.header.take().unwrap_or_else(CommandResponseHeader::default) } -#[inline] pub fn has_apply_state(&self) -> bool { self.apply_state.is_some() } -#[inline] pub fn clear_apply_state(&mut self) { self.apply_state = ::std::option::Option::None } -#[inline] pub fn set_apply_state(&mut self, v: super :: raft_serverpb :: RaftApplyState) { self.apply_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_apply_state(&self) -> &super :: raft_serverpb :: RaftApplyState { match self.apply_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_apply_state(&mut self) -> &mut super :: raft_serverpb :: RaftApplyState { if self.apply_state.is_none() { - self.apply_state = ::std::option::Option::Some(super :: raft_serverpb :: RaftApplyState::default()); - } - self.apply_state.as_mut().unwrap() } -#[inline] pub fn take_apply_state(&mut self) -> super :: raft_serverpb :: RaftApplyState { self.apply_state.take().unwrap_or_else(super :: raft_serverpb :: RaftApplyState::default) } -#[inline] pub fn clear_applied_term(&mut self) { self.applied_term = 0 } -#[inline] pub fn set_applied_term(&mut self, v: u64) { self.applied_term = v; } -#[inline] pub fn get_applied_term(&self) -> u64 { self.applied_term } + pub fn new_() -> CommandResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: CommandResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &CommandResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut CommandResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(CommandResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> CommandResponseHeader { + self.header + .take() + .unwrap_or_else(CommandResponseHeader::default) + } + #[inline] + pub fn has_apply_state(&self) -> bool { + self.apply_state.is_some() + } + #[inline] + pub fn clear_apply_state(&mut self) { + self.apply_state = ::std::option::Option::None + } + #[inline] + pub fn set_apply_state(&mut self, v: super::raft_serverpb::RaftApplyState) { + self.apply_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_apply_state(&self) -> &super::raft_serverpb::RaftApplyState { + match self.apply_state.as_ref() { + Some(v) => v, + None => { + ::default_instance() + } + } + } + #[inline] + pub fn mut_apply_state(&mut self) -> &mut super::raft_serverpb::RaftApplyState { + if self.apply_state.is_none() { + self.apply_state = + ::std::option::Option::Some(super::raft_serverpb::RaftApplyState::default()); + } + self.apply_state.as_mut().unwrap() + } + #[inline] + pub fn take_apply_state(&mut self) -> super::raft_serverpb::RaftApplyState { + self.apply_state + .take() + .unwrap_or_else(super::raft_serverpb::RaftApplyState::default) + } + #[inline] + pub fn clear_applied_term(&mut self) { + self.applied_term = 0 + } + #[inline] + pub fn set_applied_term(&mut self, v: u64) { + self.applied_term = v; + } + #[inline] + pub fn get_applied_term(&self) -> u64 { + self.applied_term + } } -impl ::protobuf::Clear for CommandResponse {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CommandResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CommandResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommandResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommandResponse = CommandResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for CommandResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommandResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommandResponse = CommandResponse::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl CommandResponseBatch { -pub fn new_() -> CommandResponseBatch { ::std::default::Default::default() } -#[inline] pub fn clear_responses(&mut self) { self.responses.clear(); } -#[inline] pub fn set_responses(&mut self, v: :: std :: vec :: Vec < CommandResponse >) { self.responses = v; } -#[inline] pub fn get_responses(&self) -> &:: std :: vec :: Vec < CommandResponse > { &self.responses } -#[inline] pub fn mut_responses(&mut self) -> &mut :: std :: vec :: Vec < CommandResponse > { &mut self.responses } -#[inline] pub fn take_responses(&mut self) -> :: std :: vec :: Vec < CommandResponse > { ::std::mem::replace(&mut self.responses, ::std::vec::Vec::new()) } + pub fn new_() -> CommandResponseBatch { + ::std::default::Default::default() + } + #[inline] + pub fn clear_responses(&mut self) { + self.responses.clear(); + } + #[inline] + pub fn set_responses(&mut self, v: ::std::vec::Vec) { + self.responses = v; + } + #[inline] + pub fn get_responses(&self) -> &::std::vec::Vec { + &self.responses + } + #[inline] + pub fn mut_responses(&mut self) -> &mut ::std::vec::Vec { + &mut self.responses + } + #[inline] + pub fn take_responses(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.responses, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for CommandResponseBatch {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CommandResponseBatch { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CommandResponseBatch {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommandResponseBatch { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommandResponseBatch = CommandResponseBatch::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for CommandResponseBatch { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommandResponseBatch { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommandResponseBatch = CommandResponseBatch::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl SnapshotState { -pub fn new_() -> SnapshotState { ::std::default::Default::default() } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn has_apply_state(&self) -> bool { self.apply_state.is_some() } -#[inline] pub fn clear_apply_state(&mut self) { self.apply_state = ::std::option::Option::None } -#[inline] pub fn set_apply_state(&mut self, v: super :: raft_serverpb :: RaftApplyState) { self.apply_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_apply_state(&self) -> &super :: raft_serverpb :: RaftApplyState { match self.apply_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_apply_state(&mut self) -> &mut super :: raft_serverpb :: RaftApplyState { if self.apply_state.is_none() { - self.apply_state = ::std::option::Option::Some(super :: raft_serverpb :: RaftApplyState::default()); - } - self.apply_state.as_mut().unwrap() } -#[inline] pub fn take_apply_state(&mut self) -> super :: raft_serverpb :: RaftApplyState { self.apply_state.take().unwrap_or_else(super :: raft_serverpb :: RaftApplyState::default) } + pub fn new_() -> SnapshotState { + ::std::default::Default::default() + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn has_apply_state(&self) -> bool { + self.apply_state.is_some() + } + #[inline] + pub fn clear_apply_state(&mut self) { + self.apply_state = ::std::option::Option::None + } + #[inline] + pub fn set_apply_state(&mut self, v: super::raft_serverpb::RaftApplyState) { + self.apply_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_apply_state(&self) -> &super::raft_serverpb::RaftApplyState { + match self.apply_state.as_ref() { + Some(v) => v, + None => { + ::default_instance() + } + } + } + #[inline] + pub fn mut_apply_state(&mut self) -> &mut super::raft_serverpb::RaftApplyState { + if self.apply_state.is_none() { + self.apply_state = + ::std::option::Option::Some(super::raft_serverpb::RaftApplyState::default()); + } + self.apply_state.as_mut().unwrap() + } + #[inline] + pub fn take_apply_state(&mut self) -> super::raft_serverpb::RaftApplyState { + self.apply_state + .take() + .unwrap_or_else(super::raft_serverpb::RaftApplyState::default) + } } -impl ::protobuf::Clear for SnapshotState {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for SnapshotState { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for SnapshotState {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapshotState { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapshotState = SnapshotState::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for SnapshotState { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapshotState { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapshotState = SnapshotState::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl SnapshotData { -pub fn new_() -> SnapshotData { ::std::default::Default::default() } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_checksum(&mut self) { self.checksum = 0 } -#[inline] pub fn set_checksum(&mut self, v: u32) { self.checksum = v; } -#[inline] pub fn get_checksum(&self) -> u32 { self.checksum } -#[inline] pub fn clear_data(&mut self) { self.data.clear(); } -#[inline] pub fn set_data(&mut self, v: :: std :: vec :: Vec < super :: raft_serverpb :: KeyValue >) { self.data = v; } -#[inline] pub fn get_data(&self) -> &:: std :: vec :: Vec < super :: raft_serverpb :: KeyValue > { &self.data } -#[inline] pub fn mut_data(&mut self) -> &mut :: std :: vec :: Vec < super :: raft_serverpb :: KeyValue > { &mut self.data } -#[inline] pub fn take_data(&mut self) -> :: std :: vec :: Vec < super :: raft_serverpb :: KeyValue > { ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) } + pub fn new_() -> SnapshotData { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_checksum(&mut self) { + self.checksum = 0 + } + #[inline] + pub fn set_checksum(&mut self, v: u32) { + self.checksum = v; + } + #[inline] + pub fn get_checksum(&self) -> u32 { + self.checksum + } + #[inline] + pub fn clear_data(&mut self) { + self.data.clear(); + } + #[inline] + pub fn set_data(&mut self, v: ::std::vec::Vec) { + self.data = v; + } + #[inline] + pub fn get_data(&self) -> &::std::vec::Vec { + &self.data + } + #[inline] + pub fn mut_data(&mut self) -> &mut ::std::vec::Vec { + &mut self.data + } + #[inline] + pub fn take_data(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for SnapshotData {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for SnapshotData { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for SnapshotData {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapshotData { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapshotData = SnapshotData::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for SnapshotData { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapshotData { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapshotData = SnapshotData::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl SnapshotRequest { -pub fn new_() -> SnapshotRequest { ::std::default::Default::default() } + pub fn new_() -> SnapshotRequest { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for SnapshotRequest {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for SnapshotRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for SnapshotRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapshotRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapshotRequest = SnapshotRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for SnapshotRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapshotRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapshotRequest = SnapshotRequest::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SnapshotDone { -pub fn new_() -> SnapshotDone { ::std::default::Default::default() } + pub fn new_() -> SnapshotDone { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for SnapshotDone {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for SnapshotDone { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for SnapshotDone {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapshotDone { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapshotDone = SnapshotDone::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) +impl ::protobuf::Message for SnapshotDone { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapshotDone { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapshotDone = SnapshotDone::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } diff --git a/src/prost/wrapper_errorpb.rs b/src/prost/wrapper_errorpb.rs index 23f21f363..686a11a63 100644 --- a/src/prost/wrapper_errorpb.rs +++ b/src/prost/wrapper_errorpb.rs @@ -1,479 +1,1143 @@ // Generated file, please don't edit manually. impl NotLeader { -pub fn new_() -> NotLeader { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn has_leader(&self) -> bool { self.leader.is_some() } -#[inline] pub fn clear_leader(&mut self) { self.leader = ::std::option::Option::None } -#[inline] pub fn set_leader(&mut self, v: super :: metapb :: Peer) { self.leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_leader(&self) -> &super :: metapb :: Peer { match self.leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_leader(&mut self) -> &mut super :: metapb :: Peer { if self.leader.is_none() { - self.leader = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.leader.as_mut().unwrap() } -#[inline] pub fn take_leader(&mut self) -> super :: metapb :: Peer { self.leader.take().unwrap_or_else(super :: metapb :: Peer::default) } + pub fn new_() -> NotLeader { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn has_leader(&self) -> bool { + self.leader.is_some() + } + #[inline] + pub fn clear_leader(&mut self) { + self.leader = ::std::option::Option::None + } + #[inline] + pub fn set_leader(&mut self, v: super::metapb::Peer) { + self.leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_leader(&self) -> &super::metapb::Peer { + match self.leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_leader(&mut self) -> &mut super::metapb::Peer { + if self.leader.is_none() { + self.leader = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.leader.as_mut().unwrap() + } + #[inline] + pub fn take_leader(&mut self) -> super::metapb::Peer { + self.leader + .take() + .unwrap_or_else(super::metapb::Peer::default) + } } -impl ::protobuf::Clear for NotLeader {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for NotLeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for NotLeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static NotLeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: NotLeader = NotLeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for NotLeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static NotLeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: NotLeader = NotLeader::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl StoreNotMatch { -pub fn new_() -> StoreNotMatch { ::std::default::Default::default() } -#[inline] pub fn clear_request_store_id(&mut self) { self.request_store_id = 0 } -#[inline] pub fn set_request_store_id(&mut self, v: u64) { self.request_store_id = v; } -#[inline] pub fn get_request_store_id(&self) -> u64 { self.request_store_id } -#[inline] pub fn clear_actual_store_id(&mut self) { self.actual_store_id = 0 } -#[inline] pub fn set_actual_store_id(&mut self, v: u64) { self.actual_store_id = v; } -#[inline] pub fn get_actual_store_id(&self) -> u64 { self.actual_store_id } + pub fn new_() -> StoreNotMatch { + ::std::default::Default::default() + } + #[inline] + pub fn clear_request_store_id(&mut self) { + self.request_store_id = 0 + } + #[inline] + pub fn set_request_store_id(&mut self, v: u64) { + self.request_store_id = v; + } + #[inline] + pub fn get_request_store_id(&self) -> u64 { + self.request_store_id + } + #[inline] + pub fn clear_actual_store_id(&mut self) { + self.actual_store_id = 0 + } + #[inline] + pub fn set_actual_store_id(&mut self, v: u64) { + self.actual_store_id = v; + } + #[inline] + pub fn get_actual_store_id(&self) -> u64 { + self.actual_store_id + } } -impl ::protobuf::Clear for StoreNotMatch {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for StoreNotMatch { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for StoreNotMatch {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StoreNotMatch { - ::lazy_static::lazy_static! { - static ref INSTANCE: StoreNotMatch = StoreNotMatch::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for StoreNotMatch { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StoreNotMatch { + ::lazy_static::lazy_static! { + static ref INSTANCE: StoreNotMatch = StoreNotMatch::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionNotFound { -pub fn new_() -> RegionNotFound { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } + pub fn new_() -> RegionNotFound { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } } -impl ::protobuf::Clear for RegionNotFound {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for RegionNotFound { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for RegionNotFound {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionNotFound { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionNotFound = RegionNotFound::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for RegionNotFound { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionNotFound { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionNotFound = RegionNotFound::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl KeyNotInRegion { -pub fn new_() -> KeyNotInRegion { ::std::default::Default::default() } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } + pub fn new_() -> KeyNotInRegion { + ::std::default::Default::default() + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for KeyNotInRegion {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for KeyNotInRegion { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for KeyNotInRegion {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static KeyNotInRegion { - ::lazy_static::lazy_static! { - static ref INSTANCE: KeyNotInRegion = KeyNotInRegion::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for KeyNotInRegion { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static KeyNotInRegion { + ::lazy_static::lazy_static! { + static ref INSTANCE: KeyNotInRegion = KeyNotInRegion::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl EpochNotMatch { -pub fn new_() -> EpochNotMatch { ::std::default::Default::default() } -#[inline] pub fn clear_current_regions(&mut self) { self.current_regions.clear(); } -#[inline] pub fn set_current_regions(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Region >) { self.current_regions = v; } -#[inline] pub fn get_current_regions(&self) -> &:: std :: vec :: Vec < super :: metapb :: Region > { &self.current_regions } -#[inline] pub fn mut_current_regions(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Region > { &mut self.current_regions } -#[inline] pub fn take_current_regions(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Region > { ::std::mem::replace(&mut self.current_regions, ::std::vec::Vec::new()) } + pub fn new_() -> EpochNotMatch { + ::std::default::Default::default() + } + #[inline] + pub fn clear_current_regions(&mut self) { + self.current_regions.clear(); + } + #[inline] + pub fn set_current_regions(&mut self, v: ::std::vec::Vec) { + self.current_regions = v; + } + #[inline] + pub fn get_current_regions(&self) -> &::std::vec::Vec { + &self.current_regions + } + #[inline] + pub fn mut_current_regions(&mut self) -> &mut ::std::vec::Vec { + &mut self.current_regions + } + #[inline] + pub fn take_current_regions(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.current_regions, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for EpochNotMatch {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for EpochNotMatch { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for EpochNotMatch {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static EpochNotMatch { - ::lazy_static::lazy_static! { - static ref INSTANCE: EpochNotMatch = EpochNotMatch::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for EpochNotMatch { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static EpochNotMatch { + ::lazy_static::lazy_static! { + static ref INSTANCE: EpochNotMatch = EpochNotMatch::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl ServerIsBusy { -pub fn new_() -> ServerIsBusy { ::std::default::Default::default() } -#[inline] pub fn clear_reason(&mut self) { self.reason.clear(); } -#[inline] pub fn set_reason(&mut self, v: std :: string :: String) { self.reason = v; } -#[inline] pub fn get_reason(&self) -> &str { &self.reason } -#[inline] pub fn mut_reason(&mut self) -> &mut std :: string :: String { &mut self.reason } -#[inline] pub fn take_reason(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.reason, ::std::string::String::new()) } -#[inline] pub fn clear_backoff_ms(&mut self) { self.backoff_ms = 0 } -#[inline] pub fn set_backoff_ms(&mut self, v: u64) { self.backoff_ms = v; } -#[inline] pub fn get_backoff_ms(&self) -> u64 { self.backoff_ms } + pub fn new_() -> ServerIsBusy { + ::std::default::Default::default() + } + #[inline] + pub fn clear_reason(&mut self) { + self.reason.clear(); + } + #[inline] + pub fn set_reason(&mut self, v: std::string::String) { + self.reason = v; + } + #[inline] + pub fn get_reason(&self) -> &str { + &self.reason + } + #[inline] + pub fn mut_reason(&mut self) -> &mut std::string::String { + &mut self.reason + } + #[inline] + pub fn take_reason(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.reason, ::std::string::String::new()) + } + #[inline] + pub fn clear_backoff_ms(&mut self) { + self.backoff_ms = 0 + } + #[inline] + pub fn set_backoff_ms(&mut self, v: u64) { + self.backoff_ms = v; + } + #[inline] + pub fn get_backoff_ms(&self) -> u64 { + self.backoff_ms + } } -impl ::protobuf::Clear for ServerIsBusy {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for ServerIsBusy { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for ServerIsBusy {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ServerIsBusy { - ::lazy_static::lazy_static! { - static ref INSTANCE: ServerIsBusy = ServerIsBusy::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for ServerIsBusy { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ServerIsBusy { + ::lazy_static::lazy_static! { + static ref INSTANCE: ServerIsBusy = ServerIsBusy::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl StaleCommand { -pub fn new_() -> StaleCommand { ::std::default::Default::default() } + pub fn new_() -> StaleCommand { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for StaleCommand {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for StaleCommand { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for StaleCommand {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StaleCommand { - ::lazy_static::lazy_static! { - static ref INSTANCE: StaleCommand = StaleCommand::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for StaleCommand { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StaleCommand { + ::lazy_static::lazy_static! { + static ref INSTANCE: StaleCommand = StaleCommand::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftEntryTooLarge { -pub fn new_() -> RaftEntryTooLarge { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn clear_entry_size(&mut self) { self.entry_size = 0 } -#[inline] pub fn set_entry_size(&mut self, v: u64) { self.entry_size = v; } -#[inline] pub fn get_entry_size(&self) -> u64 { self.entry_size } + pub fn new_() -> RaftEntryTooLarge { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn clear_entry_size(&mut self) { + self.entry_size = 0 + } + #[inline] + pub fn set_entry_size(&mut self, v: u64) { + self.entry_size = v; + } + #[inline] + pub fn get_entry_size(&self) -> u64 { + self.entry_size + } } -impl ::protobuf::Clear for RaftEntryTooLarge {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for RaftEntryTooLarge { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for RaftEntryTooLarge {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftEntryTooLarge { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftEntryTooLarge = RaftEntryTooLarge::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for RaftEntryTooLarge { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftEntryTooLarge { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftEntryTooLarge = RaftEntryTooLarge::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl Error { -pub fn new_() -> Error { ::std::default::Default::default() } -#[inline] pub fn clear_message(&mut self) { self.message.clear(); } -#[inline] pub fn set_message(&mut self, v: std :: string :: String) { self.message = v; } -#[inline] pub fn get_message(&self) -> &str { &self.message } -#[inline] pub fn mut_message(&mut self) -> &mut std :: string :: String { &mut self.message } -#[inline] pub fn take_message(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.message, ::std::string::String::new()) } -#[inline] pub fn has_not_leader(&self) -> bool { self.not_leader.is_some() } -#[inline] pub fn clear_not_leader(&mut self) { self.not_leader = ::std::option::Option::None } -#[inline] pub fn set_not_leader(&mut self, v: NotLeader) { self.not_leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_not_leader(&self) -> &NotLeader { match self.not_leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_not_leader(&mut self) -> &mut NotLeader { if self.not_leader.is_none() { - self.not_leader = ::std::option::Option::Some(NotLeader::default()); - } - self.not_leader.as_mut().unwrap() } -#[inline] pub fn take_not_leader(&mut self) -> NotLeader { self.not_leader.take().unwrap_or_else(NotLeader::default) } -#[inline] pub fn has_region_not_found(&self) -> bool { self.region_not_found.is_some() } -#[inline] pub fn clear_region_not_found(&mut self) { self.region_not_found = ::std::option::Option::None } -#[inline] pub fn set_region_not_found(&mut self, v: RegionNotFound) { self.region_not_found = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_not_found(&self) -> &RegionNotFound { match self.region_not_found.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_not_found(&mut self) -> &mut RegionNotFound { if self.region_not_found.is_none() { - self.region_not_found = ::std::option::Option::Some(RegionNotFound::default()); - } - self.region_not_found.as_mut().unwrap() } -#[inline] pub fn take_region_not_found(&mut self) -> RegionNotFound { self.region_not_found.take().unwrap_or_else(RegionNotFound::default) } -#[inline] pub fn has_key_not_in_region(&self) -> bool { self.key_not_in_region.is_some() } -#[inline] pub fn clear_key_not_in_region(&mut self) { self.key_not_in_region = ::std::option::Option::None } -#[inline] pub fn set_key_not_in_region(&mut self, v: KeyNotInRegion) { self.key_not_in_region = ::std::option::Option::Some(v); } -#[inline] pub fn get_key_not_in_region(&self) -> &KeyNotInRegion { match self.key_not_in_region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_key_not_in_region(&mut self) -> &mut KeyNotInRegion { if self.key_not_in_region.is_none() { - self.key_not_in_region = ::std::option::Option::Some(KeyNotInRegion::default()); - } - self.key_not_in_region.as_mut().unwrap() } -#[inline] pub fn take_key_not_in_region(&mut self) -> KeyNotInRegion { self.key_not_in_region.take().unwrap_or_else(KeyNotInRegion::default) } -#[inline] pub fn has_epoch_not_match(&self) -> bool { self.epoch_not_match.is_some() } -#[inline] pub fn clear_epoch_not_match(&mut self) { self.epoch_not_match = ::std::option::Option::None } -#[inline] pub fn set_epoch_not_match(&mut self, v: EpochNotMatch) { self.epoch_not_match = ::std::option::Option::Some(v); } -#[inline] pub fn get_epoch_not_match(&self) -> &EpochNotMatch { match self.epoch_not_match.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_epoch_not_match(&mut self) -> &mut EpochNotMatch { if self.epoch_not_match.is_none() { - self.epoch_not_match = ::std::option::Option::Some(EpochNotMatch::default()); - } - self.epoch_not_match.as_mut().unwrap() } -#[inline] pub fn take_epoch_not_match(&mut self) -> EpochNotMatch { self.epoch_not_match.take().unwrap_or_else(EpochNotMatch::default) } -#[inline] pub fn has_server_is_busy(&self) -> bool { self.server_is_busy.is_some() } -#[inline] pub fn clear_server_is_busy(&mut self) { self.server_is_busy = ::std::option::Option::None } -#[inline] pub fn set_server_is_busy(&mut self, v: ServerIsBusy) { self.server_is_busy = ::std::option::Option::Some(v); } -#[inline] pub fn get_server_is_busy(&self) -> &ServerIsBusy { match self.server_is_busy.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_server_is_busy(&mut self) -> &mut ServerIsBusy { if self.server_is_busy.is_none() { - self.server_is_busy = ::std::option::Option::Some(ServerIsBusy::default()); - } - self.server_is_busy.as_mut().unwrap() } -#[inline] pub fn take_server_is_busy(&mut self) -> ServerIsBusy { self.server_is_busy.take().unwrap_or_else(ServerIsBusy::default) } -#[inline] pub fn has_stale_command(&self) -> bool { self.stale_command.is_some() } -#[inline] pub fn clear_stale_command(&mut self) { self.stale_command = ::std::option::Option::None } -#[inline] pub fn set_stale_command(&mut self, v: StaleCommand) { self.stale_command = ::std::option::Option::Some(v); } -#[inline] pub fn get_stale_command(&self) -> &StaleCommand { match self.stale_command.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_stale_command(&mut self) -> &mut StaleCommand { if self.stale_command.is_none() { - self.stale_command = ::std::option::Option::Some(StaleCommand::default()); - } - self.stale_command.as_mut().unwrap() } -#[inline] pub fn take_stale_command(&mut self) -> StaleCommand { self.stale_command.take().unwrap_or_else(StaleCommand::default) } -#[inline] pub fn has_store_not_match(&self) -> bool { self.store_not_match.is_some() } -#[inline] pub fn clear_store_not_match(&mut self) { self.store_not_match = ::std::option::Option::None } -#[inline] pub fn set_store_not_match(&mut self, v: StoreNotMatch) { self.store_not_match = ::std::option::Option::Some(v); } -#[inline] pub fn get_store_not_match(&self) -> &StoreNotMatch { match self.store_not_match.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_store_not_match(&mut self) -> &mut StoreNotMatch { if self.store_not_match.is_none() { - self.store_not_match = ::std::option::Option::Some(StoreNotMatch::default()); - } - self.store_not_match.as_mut().unwrap() } -#[inline] pub fn take_store_not_match(&mut self) -> StoreNotMatch { self.store_not_match.take().unwrap_or_else(StoreNotMatch::default) } -#[inline] pub fn has_raft_entry_too_large(&self) -> bool { self.raft_entry_too_large.is_some() } -#[inline] pub fn clear_raft_entry_too_large(&mut self) { self.raft_entry_too_large = ::std::option::Option::None } -#[inline] pub fn set_raft_entry_too_large(&mut self, v: RaftEntryTooLarge) { self.raft_entry_too_large = ::std::option::Option::Some(v); } -#[inline] pub fn get_raft_entry_too_large(&self) -> &RaftEntryTooLarge { match self.raft_entry_too_large.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_raft_entry_too_large(&mut self) -> &mut RaftEntryTooLarge { if self.raft_entry_too_large.is_none() { - self.raft_entry_too_large = ::std::option::Option::Some(RaftEntryTooLarge::default()); - } - self.raft_entry_too_large.as_mut().unwrap() } -#[inline] pub fn take_raft_entry_too_large(&mut self) -> RaftEntryTooLarge { self.raft_entry_too_large.take().unwrap_or_else(RaftEntryTooLarge::default) } + pub fn new_() -> Error { + ::std::default::Default::default() + } + #[inline] + pub fn clear_message(&mut self) { + self.message.clear(); + } + #[inline] + pub fn set_message(&mut self, v: std::string::String) { + self.message = v; + } + #[inline] + pub fn get_message(&self) -> &str { + &self.message + } + #[inline] + pub fn mut_message(&mut self) -> &mut std::string::String { + &mut self.message + } + #[inline] + pub fn take_message(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.message, ::std::string::String::new()) + } + #[inline] + pub fn has_not_leader(&self) -> bool { + self.not_leader.is_some() + } + #[inline] + pub fn clear_not_leader(&mut self) { + self.not_leader = ::std::option::Option::None + } + #[inline] + pub fn set_not_leader(&mut self, v: NotLeader) { + self.not_leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_not_leader(&self) -> &NotLeader { + match self.not_leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_not_leader(&mut self) -> &mut NotLeader { + if self.not_leader.is_none() { + self.not_leader = ::std::option::Option::Some(NotLeader::default()); + } + self.not_leader.as_mut().unwrap() + } + #[inline] + pub fn take_not_leader(&mut self) -> NotLeader { + self.not_leader.take().unwrap_or_else(NotLeader::default) + } + #[inline] + pub fn has_region_not_found(&self) -> bool { + self.region_not_found.is_some() + } + #[inline] + pub fn clear_region_not_found(&mut self) { + self.region_not_found = ::std::option::Option::None + } + #[inline] + pub fn set_region_not_found(&mut self, v: RegionNotFound) { + self.region_not_found = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_not_found(&self) -> &RegionNotFound { + match self.region_not_found.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_not_found(&mut self) -> &mut RegionNotFound { + if self.region_not_found.is_none() { + self.region_not_found = ::std::option::Option::Some(RegionNotFound::default()); + } + self.region_not_found.as_mut().unwrap() + } + #[inline] + pub fn take_region_not_found(&mut self) -> RegionNotFound { + self.region_not_found + .take() + .unwrap_or_else(RegionNotFound::default) + } + #[inline] + pub fn has_key_not_in_region(&self) -> bool { + self.key_not_in_region.is_some() + } + #[inline] + pub fn clear_key_not_in_region(&mut self) { + self.key_not_in_region = ::std::option::Option::None + } + #[inline] + pub fn set_key_not_in_region(&mut self, v: KeyNotInRegion) { + self.key_not_in_region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_key_not_in_region(&self) -> &KeyNotInRegion { + match self.key_not_in_region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_key_not_in_region(&mut self) -> &mut KeyNotInRegion { + if self.key_not_in_region.is_none() { + self.key_not_in_region = ::std::option::Option::Some(KeyNotInRegion::default()); + } + self.key_not_in_region.as_mut().unwrap() + } + #[inline] + pub fn take_key_not_in_region(&mut self) -> KeyNotInRegion { + self.key_not_in_region + .take() + .unwrap_or_else(KeyNotInRegion::default) + } + #[inline] + pub fn has_epoch_not_match(&self) -> bool { + self.epoch_not_match.is_some() + } + #[inline] + pub fn clear_epoch_not_match(&mut self) { + self.epoch_not_match = ::std::option::Option::None + } + #[inline] + pub fn set_epoch_not_match(&mut self, v: EpochNotMatch) { + self.epoch_not_match = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_epoch_not_match(&self) -> &EpochNotMatch { + match self.epoch_not_match.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_epoch_not_match(&mut self) -> &mut EpochNotMatch { + if self.epoch_not_match.is_none() { + self.epoch_not_match = ::std::option::Option::Some(EpochNotMatch::default()); + } + self.epoch_not_match.as_mut().unwrap() + } + #[inline] + pub fn take_epoch_not_match(&mut self) -> EpochNotMatch { + self.epoch_not_match + .take() + .unwrap_or_else(EpochNotMatch::default) + } + #[inline] + pub fn has_server_is_busy(&self) -> bool { + self.server_is_busy.is_some() + } + #[inline] + pub fn clear_server_is_busy(&mut self) { + self.server_is_busy = ::std::option::Option::None + } + #[inline] + pub fn set_server_is_busy(&mut self, v: ServerIsBusy) { + self.server_is_busy = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_server_is_busy(&self) -> &ServerIsBusy { + match self.server_is_busy.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_server_is_busy(&mut self) -> &mut ServerIsBusy { + if self.server_is_busy.is_none() { + self.server_is_busy = ::std::option::Option::Some(ServerIsBusy::default()); + } + self.server_is_busy.as_mut().unwrap() + } + #[inline] + pub fn take_server_is_busy(&mut self) -> ServerIsBusy { + self.server_is_busy + .take() + .unwrap_or_else(ServerIsBusy::default) + } + #[inline] + pub fn has_stale_command(&self) -> bool { + self.stale_command.is_some() + } + #[inline] + pub fn clear_stale_command(&mut self) { + self.stale_command = ::std::option::Option::None + } + #[inline] + pub fn set_stale_command(&mut self, v: StaleCommand) { + self.stale_command = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_stale_command(&self) -> &StaleCommand { + match self.stale_command.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_stale_command(&mut self) -> &mut StaleCommand { + if self.stale_command.is_none() { + self.stale_command = ::std::option::Option::Some(StaleCommand::default()); + } + self.stale_command.as_mut().unwrap() + } + #[inline] + pub fn take_stale_command(&mut self) -> StaleCommand { + self.stale_command + .take() + .unwrap_or_else(StaleCommand::default) + } + #[inline] + pub fn has_store_not_match(&self) -> bool { + self.store_not_match.is_some() + } + #[inline] + pub fn clear_store_not_match(&mut self) { + self.store_not_match = ::std::option::Option::None + } + #[inline] + pub fn set_store_not_match(&mut self, v: StoreNotMatch) { + self.store_not_match = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_store_not_match(&self) -> &StoreNotMatch { + match self.store_not_match.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_store_not_match(&mut self) -> &mut StoreNotMatch { + if self.store_not_match.is_none() { + self.store_not_match = ::std::option::Option::Some(StoreNotMatch::default()); + } + self.store_not_match.as_mut().unwrap() + } + #[inline] + pub fn take_store_not_match(&mut self) -> StoreNotMatch { + self.store_not_match + .take() + .unwrap_or_else(StoreNotMatch::default) + } + #[inline] + pub fn has_raft_entry_too_large(&self) -> bool { + self.raft_entry_too_large.is_some() + } + #[inline] + pub fn clear_raft_entry_too_large(&mut self) { + self.raft_entry_too_large = ::std::option::Option::None + } + #[inline] + pub fn set_raft_entry_too_large(&mut self, v: RaftEntryTooLarge) { + self.raft_entry_too_large = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_raft_entry_too_large(&self) -> &RaftEntryTooLarge { + match self.raft_entry_too_large.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_raft_entry_too_large(&mut self) -> &mut RaftEntryTooLarge { + if self.raft_entry_too_large.is_none() { + self.raft_entry_too_large = ::std::option::Option::Some(RaftEntryTooLarge::default()); + } + self.raft_entry_too_large.as_mut().unwrap() + } + #[inline] + pub fn take_raft_entry_too_large(&mut self) -> RaftEntryTooLarge { + self.raft_entry_too_large + .take() + .unwrap_or_else(RaftEntryTooLarge::default) + } } -impl ::protobuf::Clear for Error {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Error { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Error {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Error { - ::lazy_static::lazy_static! { - static ref INSTANCE: Error = Error::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for Error { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Error { + ::lazy_static::lazy_static! { + static ref INSTANCE: Error = Error::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } diff --git a/src/prost/wrapper_import_kvpb.rs b/src/prost/wrapper_import_kvpb.rs index 84d3678d0..69630d5ad 100644 --- a/src/prost/wrapper_import_kvpb.rs +++ b/src/prost/wrapper_import_kvpb.rs @@ -1,801 +1,1783 @@ // Generated file, please don't edit manually. impl SwitchModeRequest { -pub fn new_() -> SwitchModeRequest { ::std::default::Default::default() } -#[inline] pub fn clear_pd_addr(&mut self) { self.pd_addr.clear(); } -#[inline] pub fn set_pd_addr(&mut self, v: std :: string :: String) { self.pd_addr = v; } -#[inline] pub fn get_pd_addr(&self) -> &str { &self.pd_addr } -#[inline] pub fn mut_pd_addr(&mut self) -> &mut std :: string :: String { &mut self.pd_addr } -#[inline] pub fn take_pd_addr(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.pd_addr, ::std::string::String::new()) } -#[inline] pub fn has_request(&self) -> bool { self.request.is_some() } -#[inline] pub fn clear_request(&mut self) { self.request = ::std::option::Option::None } -#[inline] pub fn set_request(&mut self, v: super :: import_sstpb :: SwitchModeRequest) { self.request = ::std::option::Option::Some(v); } -#[inline] pub fn get_request(&self) -> &super :: import_sstpb :: SwitchModeRequest { match self.request.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_request(&mut self) -> &mut super :: import_sstpb :: SwitchModeRequest { if self.request.is_none() { - self.request = ::std::option::Option::Some(super :: import_sstpb :: SwitchModeRequest::default()); - } - self.request.as_mut().unwrap() } -#[inline] pub fn take_request(&mut self) -> super :: import_sstpb :: SwitchModeRequest { self.request.take().unwrap_or_else(super :: import_sstpb :: SwitchModeRequest::default) } -} -impl ::protobuf::Clear for SwitchModeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SwitchModeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SwitchModeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: SwitchModeRequest = SwitchModeRequest::new_(); + pub fn new_() -> SwitchModeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_pd_addr(&mut self) { + self.pd_addr.clear(); + } + #[inline] + pub fn set_pd_addr(&mut self, v: std::string::String) { + self.pd_addr = v; + } + #[inline] + pub fn get_pd_addr(&self) -> &str { + &self.pd_addr + } + #[inline] + pub fn mut_pd_addr(&mut self) -> &mut std::string::String { + &mut self.pd_addr + } + #[inline] + pub fn take_pd_addr(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.pd_addr, ::std::string::String::new()) + } + #[inline] + pub fn has_request(&self) -> bool { + self.request.is_some() + } + #[inline] + pub fn clear_request(&mut self) { + self.request = ::std::option::Option::None + } + #[inline] + pub fn set_request(&mut self, v: super::import_sstpb::SwitchModeRequest) { + self.request = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_request(&self) -> &super::import_sstpb::SwitchModeRequest { + match self.request.as_ref() { + Some(v) => v, + None => { + ::default_instance() } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + } + #[inline] + pub fn mut_request(&mut self) -> &mut super::import_sstpb::SwitchModeRequest { + if self.request.is_none() { + self.request = + ::std::option::Option::Some(super::import_sstpb::SwitchModeRequest::default()); + } + self.request.as_mut().unwrap() + } + #[inline] + pub fn take_request(&mut self) -> super::import_sstpb::SwitchModeRequest { + self.request + .take() + .unwrap_or_else(super::import_sstpb::SwitchModeRequest::default) + } +} +impl ::protobuf::Clear for SwitchModeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SwitchModeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SwitchModeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: SwitchModeRequest = SwitchModeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SwitchModeResponse { -pub fn new_() -> SwitchModeResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for SwitchModeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SwitchModeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SwitchModeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: SwitchModeResponse = SwitchModeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> SwitchModeResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for SwitchModeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SwitchModeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SwitchModeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: SwitchModeResponse = SwitchModeResponse::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl OpenEngineRequest { -pub fn new_() -> OpenEngineRequest { ::std::default::Default::default() } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for OpenEngineRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for OpenEngineRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static OpenEngineRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: OpenEngineRequest = OpenEngineRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> OpenEngineRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for OpenEngineRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for OpenEngineRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static OpenEngineRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: OpenEngineRequest = OpenEngineRequest::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl OpenEngineResponse { -pub fn new_() -> OpenEngineResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for OpenEngineResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for OpenEngineResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static OpenEngineResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: OpenEngineResponse = OpenEngineResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> OpenEngineResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for OpenEngineResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for OpenEngineResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static OpenEngineResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: OpenEngineResponse = OpenEngineResponse::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl WriteHead { -pub fn new_() -> WriteHead { ::std::default::Default::default() } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for WriteHead {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WriteHead {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WriteHead { - ::lazy_static::lazy_static! { - static ref INSTANCE: WriteHead = WriteHead::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> WriteHead { + ::std::default::Default::default() + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for WriteHead { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WriteHead { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WriteHead { + ::lazy_static::lazy_static! { + static ref INSTANCE: WriteHead = WriteHead::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl Mutation { -pub fn new_() -> Mutation { ::std::default::Default::default() } -#[inline] pub fn clear_op(&mut self) { self.op = 0 } -#[inline] pub fn set_op_(&mut self, v: mutation::Op) { self.op = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_op(&self) -> mutation::Op { unsafe { ::std::mem::transmute::(self.op) } } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for Mutation {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Mutation {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Mutation { - ::lazy_static::lazy_static! { - static ref INSTANCE: Mutation = Mutation::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> Mutation { + ::std::default::Default::default() + } + #[inline] + pub fn clear_op(&mut self) { + self.op = 0 + } + #[inline] + pub fn set_op_(&mut self, v: mutation::Op) { + self.op = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_op(&self) -> mutation::Op { + unsafe { ::std::mem::transmute::(self.op) } + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for Mutation { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Mutation { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Mutation { + ::lazy_static::lazy_static! { + static ref INSTANCE: Mutation = Mutation::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl mutation::Op { -pub fn values() -> &'static [Self] { -static VALUES: &'static [mutation::Op] = &[ -mutation::Op::Put, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [mutation::Op] = &[mutation::Op::Put]; + VALUES + } } impl WriteBatch { -pub fn new_() -> WriteBatch { ::std::default::Default::default() } -#[inline] pub fn clear_commit_ts(&mut self) { self.commit_ts = 0 } -#[inline] pub fn set_commit_ts(&mut self, v: u64) { self.commit_ts = v; } -#[inline] pub fn get_commit_ts(&self) -> u64 { self.commit_ts } -#[inline] pub fn clear_mutations(&mut self) { self.mutations.clear(); } -#[inline] pub fn set_mutations(&mut self, v: :: std :: vec :: Vec < Mutation >) { self.mutations = v; } -#[inline] pub fn get_mutations(&self) -> &:: std :: vec :: Vec < Mutation > { &self.mutations } -#[inline] pub fn mut_mutations(&mut self) -> &mut :: std :: vec :: Vec < Mutation > { &mut self.mutations } -#[inline] pub fn take_mutations(&mut self) -> :: std :: vec :: Vec < Mutation > { ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for WriteBatch {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WriteBatch {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WriteBatch { - ::lazy_static::lazy_static! { - static ref INSTANCE: WriteBatch = WriteBatch::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> WriteBatch { + ::std::default::Default::default() + } + #[inline] + pub fn clear_commit_ts(&mut self) { + self.commit_ts = 0 + } + #[inline] + pub fn set_commit_ts(&mut self, v: u64) { + self.commit_ts = v; + } + #[inline] + pub fn get_commit_ts(&self) -> u64 { + self.commit_ts + } + #[inline] + pub fn clear_mutations(&mut self) { + self.mutations.clear(); + } + #[inline] + pub fn set_mutations(&mut self, v: ::std::vec::Vec) { + self.mutations = v; + } + #[inline] + pub fn get_mutations(&self) -> &::std::vec::Vec { + &self.mutations + } + #[inline] + pub fn mut_mutations(&mut self) -> &mut ::std::vec::Vec { + &mut self.mutations + } + #[inline] + pub fn take_mutations(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for WriteBatch { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WriteBatch { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WriteBatch { + ::lazy_static::lazy_static! { + static ref INSTANCE: WriteBatch = WriteBatch::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl WriteEngineRequest { -pub fn new_() -> WriteEngineRequest { ::std::default::Default::default() } -} -impl ::protobuf::Clear for WriteEngineRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WriteEngineRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WriteEngineRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: WriteEngineRequest = WriteEngineRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> WriteEngineRequest { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for WriteEngineRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WriteEngineRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WriteEngineRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: WriteEngineRequest = WriteEngineRequest::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl WriteEngineResponse { -pub fn new_() -> WriteEngineResponse { ::std::default::Default::default() } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: Error) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &Error { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut Error { if self.error.is_none() { - self.error = ::std::option::Option::Some(Error::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> Error { self.error.take().unwrap_or_else(Error::default) } -} -impl ::protobuf::Clear for WriteEngineResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WriteEngineResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WriteEngineResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: WriteEngineResponse = WriteEngineResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> WriteEngineResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: Error) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &Error { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + } + #[inline] + pub fn mut_error(&mut self) -> &mut Error { + if self.error.is_none() { + self.error = ::std::option::Option::Some(Error::default()); } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> Error { + self.error.take().unwrap_or_else(Error::default) + } +} +impl ::protobuf::Clear for WriteEngineResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WriteEngineResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WriteEngineResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: WriteEngineResponse = WriteEngineResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CloseEngineRequest { -pub fn new_() -> CloseEngineRequest { ::std::default::Default::default() } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for CloseEngineRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CloseEngineRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CloseEngineRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CloseEngineRequest = CloseEngineRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> CloseEngineRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for CloseEngineRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CloseEngineRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CloseEngineRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CloseEngineRequest = CloseEngineRequest::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl CloseEngineResponse { -pub fn new_() -> CloseEngineResponse { ::std::default::Default::default() } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: Error) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &Error { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut Error { if self.error.is_none() { - self.error = ::std::option::Option::Some(Error::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> Error { self.error.take().unwrap_or_else(Error::default) } -} -impl ::protobuf::Clear for CloseEngineResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CloseEngineResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CloseEngineResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CloseEngineResponse = CloseEngineResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> CloseEngineResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: Error) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &Error { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + } + #[inline] + pub fn mut_error(&mut self) -> &mut Error { + if self.error.is_none() { + self.error = ::std::option::Option::Some(Error::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> Error { + self.error.take().unwrap_or_else(Error::default) + } +} +impl ::protobuf::Clear for CloseEngineResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CloseEngineResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CloseEngineResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CloseEngineResponse = CloseEngineResponse::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ImportEngineRequest { -pub fn new_() -> ImportEngineRequest { ::std::default::Default::default() } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -#[inline] pub fn clear_pd_addr(&mut self) { self.pd_addr.clear(); } -#[inline] pub fn set_pd_addr(&mut self, v: std :: string :: String) { self.pd_addr = v; } -#[inline] pub fn get_pd_addr(&self) -> &str { &self.pd_addr } -#[inline] pub fn mut_pd_addr(&mut self) -> &mut std :: string :: String { &mut self.pd_addr } -#[inline] pub fn take_pd_addr(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.pd_addr, ::std::string::String::new()) } -} -impl ::protobuf::Clear for ImportEngineRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ImportEngineRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ImportEngineRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ImportEngineRequest = ImportEngineRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> ImportEngineRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_pd_addr(&mut self) { + self.pd_addr.clear(); + } + #[inline] + pub fn set_pd_addr(&mut self, v: std::string::String) { + self.pd_addr = v; + } + #[inline] + pub fn get_pd_addr(&self) -> &str { + &self.pd_addr + } + #[inline] + pub fn mut_pd_addr(&mut self) -> &mut std::string::String { + &mut self.pd_addr + } + #[inline] + pub fn take_pd_addr(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.pd_addr, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for ImportEngineRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ImportEngineRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ImportEngineRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ImportEngineRequest = ImportEngineRequest::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl ImportEngineResponse { -pub fn new_() -> ImportEngineResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for ImportEngineResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ImportEngineResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ImportEngineResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ImportEngineResponse = ImportEngineResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> ImportEngineResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for ImportEngineResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ImportEngineResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ImportEngineResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ImportEngineResponse = ImportEngineResponse::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl CleanupEngineRequest { -pub fn new_() -> CleanupEngineRequest { ::std::default::Default::default() } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for CleanupEngineRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CleanupEngineRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CleanupEngineRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CleanupEngineRequest = CleanupEngineRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> CleanupEngineRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for CleanupEngineRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CleanupEngineRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CleanupEngineRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CleanupEngineRequest = CleanupEngineRequest::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl CleanupEngineResponse { -pub fn new_() -> CleanupEngineResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for CleanupEngineResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CleanupEngineResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CleanupEngineResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CleanupEngineResponse = CleanupEngineResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> CleanupEngineResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for CleanupEngineResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CleanupEngineResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CleanupEngineResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CleanupEngineResponse = CleanupEngineResponse::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactClusterRequest { -pub fn new_() -> CompactClusterRequest { ::std::default::Default::default() } -#[inline] pub fn clear_pd_addr(&mut self) { self.pd_addr.clear(); } -#[inline] pub fn set_pd_addr(&mut self, v: std :: string :: String) { self.pd_addr = v; } -#[inline] pub fn get_pd_addr(&self) -> &str { &self.pd_addr } -#[inline] pub fn mut_pd_addr(&mut self) -> &mut std :: string :: String { &mut self.pd_addr } -#[inline] pub fn take_pd_addr(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.pd_addr, ::std::string::String::new()) } -#[inline] pub fn has_request(&self) -> bool { self.request.is_some() } -#[inline] pub fn clear_request(&mut self) { self.request = ::std::option::Option::None } -#[inline] pub fn set_request(&mut self, v: super :: import_sstpb :: CompactRequest) { self.request = ::std::option::Option::Some(v); } -#[inline] pub fn get_request(&self) -> &super :: import_sstpb :: CompactRequest { match self.request.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_request(&mut self) -> &mut super :: import_sstpb :: CompactRequest { if self.request.is_none() { - self.request = ::std::option::Option::Some(super :: import_sstpb :: CompactRequest::default()); - } - self.request.as_mut().unwrap() } -#[inline] pub fn take_request(&mut self) -> super :: import_sstpb :: CompactRequest { self.request.take().unwrap_or_else(super :: import_sstpb :: CompactRequest::default) } -} -impl ::protobuf::Clear for CompactClusterRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CompactClusterRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactClusterRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactClusterRequest = CompactClusterRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); + pub fn new_() -> CompactClusterRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_pd_addr(&mut self) { + self.pd_addr.clear(); + } + #[inline] + pub fn set_pd_addr(&mut self, v: std::string::String) { + self.pd_addr = v; + } + #[inline] + pub fn get_pd_addr(&self) -> &str { + &self.pd_addr + } + #[inline] + pub fn mut_pd_addr(&mut self) -> &mut std::string::String { + &mut self.pd_addr + } + #[inline] + pub fn take_pd_addr(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.pd_addr, ::std::string::String::new()) + } + #[inline] + pub fn has_request(&self) -> bool { + self.request.is_some() + } + #[inline] + pub fn clear_request(&mut self) { + self.request = ::std::option::Option::None + } + #[inline] + pub fn set_request(&mut self, v: super::import_sstpb::CompactRequest) { + self.request = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_request(&self) -> &super::import_sstpb::CompactRequest { + match self.request.as_ref() { + Some(v) => v, + None => { + ::default_instance() } - Ok(buf) } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + } + #[inline] + pub fn mut_request(&mut self) -> &mut super::import_sstpb::CompactRequest { + if self.request.is_none() { + self.request = + ::std::option::Option::Some(super::import_sstpb::CompactRequest::default()); } + self.request.as_mut().unwrap() + } + #[inline] + pub fn take_request(&mut self) -> super::import_sstpb::CompactRequest { + self.request + .take() + .unwrap_or_else(super::import_sstpb::CompactRequest::default) + } +} +impl ::protobuf::Clear for CompactClusterRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CompactClusterRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactClusterRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactClusterRequest = CompactClusterRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactClusterResponse { -pub fn new_() -> CompactClusterResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for CompactClusterResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CompactClusterResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactClusterResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactClusterResponse = CompactClusterResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> CompactClusterResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for CompactClusterResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CompactClusterResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactClusterResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactClusterResponse = CompactClusterResponse::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Error { -pub fn new_() -> Error { ::std::default::Default::default() } -#[inline] pub fn has_engine_not_found(&self) -> bool { self.engine_not_found.is_some() } -#[inline] pub fn clear_engine_not_found(&mut self) { self.engine_not_found = ::std::option::Option::None } -#[inline] pub fn set_engine_not_found(&mut self, v: error :: EngineNotFound) { self.engine_not_found = ::std::option::Option::Some(v); } -#[inline] pub fn get_engine_not_found(&self) -> &error :: EngineNotFound { match self.engine_not_found.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_engine_not_found(&mut self) -> &mut error :: EngineNotFound { if self.engine_not_found.is_none() { - self.engine_not_found = ::std::option::Option::Some(error :: EngineNotFound::default()); - } - self.engine_not_found.as_mut().unwrap() } -#[inline] pub fn take_engine_not_found(&mut self) -> error :: EngineNotFound { self.engine_not_found.take().unwrap_or_else(error :: EngineNotFound::default) } -} -impl ::protobuf::Clear for Error {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Error {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Error { - ::lazy_static::lazy_static! { - static ref INSTANCE: Error = Error::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> Error { + ::std::default::Default::default() + } + #[inline] + pub fn has_engine_not_found(&self) -> bool { + self.engine_not_found.is_some() + } + #[inline] + pub fn clear_engine_not_found(&mut self) { + self.engine_not_found = ::std::option::Option::None + } + #[inline] + pub fn set_engine_not_found(&mut self, v: error::EngineNotFound) { + self.engine_not_found = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_engine_not_found(&self) -> &error::EngineNotFound { + match self.engine_not_found.as_ref() { + Some(v) => v, + None => ::default_instance(), } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + } + #[inline] + pub fn mut_engine_not_found(&mut self) -> &mut error::EngineNotFound { + if self.engine_not_found.is_none() { + self.engine_not_found = ::std::option::Option::Some(error::EngineNotFound::default()); } + self.engine_not_found.as_mut().unwrap() + } + #[inline] + pub fn take_engine_not_found(&mut self) -> error::EngineNotFound { + self.engine_not_found + .take() + .unwrap_or_else(error::EngineNotFound::default) + } +} +impl ::protobuf::Clear for Error { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Error { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Error { + ::lazy_static::lazy_static! { + static ref INSTANCE: Error = Error::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl error::EngineNotFound { -pub fn new_() -> error::EngineNotFound { ::std::default::Default::default() } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for error::EngineNotFound {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for error::EngineNotFound {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static error::EngineNotFound { - ::lazy_static::lazy_static! { - static ref INSTANCE: error::EngineNotFound = error::EngineNotFound::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + pub fn new_() -> error::EngineNotFound { + ::std::default::Default::default() + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for error::EngineNotFound { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for error::EngineNotFound { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static error::EngineNotFound { + ::lazy_static::lazy_static! { + static ref INSTANCE: error::EngineNotFound = error::EngineNotFound::new_(); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } diff --git a/src/prost/wrapper_import_sstpb.rs b/src/prost/wrapper_import_sstpb.rs index e7fb828ed..15c491239 100644 --- a/src/prost/wrapper_import_sstpb.rs +++ b/src/prost/wrapper_import_sstpb.rs @@ -1,468 +1,1044 @@ // Generated file, please don't edit manually. impl SwitchModeRequest { -pub fn new_() -> SwitchModeRequest { ::std::default::Default::default() } -#[inline] pub fn clear_mode(&mut self) { self.mode = 0 } -#[inline] pub fn set_mode_(&mut self, v: SwitchMode) { self.mode = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_mode(&self) -> SwitchMode { unsafe { ::std::mem::transmute::(self.mode) } } + pub fn new_() -> SwitchModeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_mode(&mut self) { + self.mode = 0 + } + #[inline] + pub fn set_mode_(&mut self, v: SwitchMode) { + self.mode = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_mode(&self) -> SwitchMode { + unsafe { ::std::mem::transmute::(self.mode) } + } } -impl ::protobuf::Clear for SwitchModeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for SwitchModeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for SwitchModeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SwitchModeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: SwitchModeRequest = SwitchModeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for SwitchModeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SwitchModeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: SwitchModeRequest = SwitchModeRequest::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SwitchModeResponse { -pub fn new_() -> SwitchModeResponse { ::std::default::Default::default() } + pub fn new_() -> SwitchModeResponse { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for SwitchModeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for SwitchModeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for SwitchModeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SwitchModeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: SwitchModeResponse = SwitchModeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for SwitchModeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SwitchModeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: SwitchModeResponse = SwitchModeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Range { -pub fn new_() -> Range { ::std::default::Default::default() } -#[inline] pub fn clear_start(&mut self) { self.start.clear(); } -#[inline] pub fn set_start(&mut self, v: std :: vec :: Vec < u8 >) { self.start = v; } -#[inline] pub fn get_start(&self) -> &[u8] { &self.start } -#[inline] pub fn mut_start(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start } -#[inline] pub fn take_start(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end(&mut self) { self.end.clear(); } -#[inline] pub fn set_end(&mut self, v: std :: vec :: Vec < u8 >) { self.end = v; } -#[inline] pub fn get_end(&self) -> &[u8] { &self.end } -#[inline] pub fn mut_end(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end } -#[inline] pub fn take_end(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end, ::std::vec::Vec::new()) } + pub fn new_() -> Range { + ::std::default::Default::default() + } + #[inline] + pub fn clear_start(&mut self) { + self.start.clear(); + } + #[inline] + pub fn set_start(&mut self, v: std::vec::Vec) { + self.start = v; + } + #[inline] + pub fn get_start(&self) -> &[u8] { + &self.start + } + #[inline] + pub fn mut_start(&mut self) -> &mut std::vec::Vec { + &mut self.start + } + #[inline] + pub fn take_start(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end(&mut self) { + self.end.clear(); + } + #[inline] + pub fn set_end(&mut self, v: std::vec::Vec) { + self.end = v; + } + #[inline] + pub fn get_end(&self) -> &[u8] { + &self.end + } + #[inline] + pub fn mut_end(&mut self) -> &mut std::vec::Vec { + &mut self.end + } + #[inline] + pub fn take_end(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for Range {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Range { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Range {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Range { - ::lazy_static::lazy_static! { - static ref INSTANCE: Range = Range::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for Range { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Range { + ::lazy_static::lazy_static! { + static ref INSTANCE: Range = Range::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SstMeta { -pub fn new_() -> SstMeta { ::std::default::Default::default() } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -#[inline] pub fn has_range(&self) -> bool { self.range.is_some() } -#[inline] pub fn clear_range(&mut self) { self.range = ::std::option::Option::None } -#[inline] pub fn set_range(&mut self, v: Range) { self.range = ::std::option::Option::Some(v); } -#[inline] pub fn get_range(&self) -> &Range { match self.range.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_range(&mut self) -> &mut Range { if self.range.is_none() { - self.range = ::std::option::Option::Some(Range::default()); - } - self.range.as_mut().unwrap() } -#[inline] pub fn take_range(&mut self) -> Range { self.range.take().unwrap_or_else(Range::default) } -#[inline] pub fn clear_crc32(&mut self) { self.crc32 = 0 } -#[inline] pub fn set_crc32(&mut self, v: u32) { self.crc32 = v; } -#[inline] pub fn get_crc32(&self) -> u32 { self.crc32 } -#[inline] pub fn clear_length(&mut self) { self.length = 0 } -#[inline] pub fn set_length(&mut self, v: u64) { self.length = v; } -#[inline] pub fn get_length(&self) -> u64 { self.length } -#[inline] pub fn clear_cf_name(&mut self) { self.cf_name.clear(); } -#[inline] pub fn set_cf_name(&mut self, v: std :: string :: String) { self.cf_name = v; } -#[inline] pub fn get_cf_name(&self) -> &str { &self.cf_name } -#[inline] pub fn mut_cf_name(&mut self) -> &mut std :: string :: String { &mut self.cf_name } -#[inline] pub fn take_cf_name(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf_name, ::std::string::String::new()) } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn has_region_epoch(&self) -> bool { self.region_epoch.is_some() } -#[inline] pub fn clear_region_epoch(&mut self) { self.region_epoch = ::std::option::Option::None } -#[inline] pub fn set_region_epoch(&mut self, v: super :: metapb :: RegionEpoch) { self.region_epoch = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_epoch(&self) -> &super :: metapb :: RegionEpoch { match self.region_epoch.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_epoch(&mut self) -> &mut super :: metapb :: RegionEpoch { if self.region_epoch.is_none() { - self.region_epoch = ::std::option::Option::Some(super :: metapb :: RegionEpoch::default()); - } - self.region_epoch.as_mut().unwrap() } -#[inline] pub fn take_region_epoch(&mut self) -> super :: metapb :: RegionEpoch { self.region_epoch.take().unwrap_or_else(super :: metapb :: RegionEpoch::default) } + pub fn new_() -> SstMeta { + ::std::default::Default::default() + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_range(&self) -> bool { + self.range.is_some() + } + #[inline] + pub fn clear_range(&mut self) { + self.range = ::std::option::Option::None + } + #[inline] + pub fn set_range(&mut self, v: Range) { + self.range = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_range(&self) -> &Range { + match self.range.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_range(&mut self) -> &mut Range { + if self.range.is_none() { + self.range = ::std::option::Option::Some(Range::default()); + } + self.range.as_mut().unwrap() + } + #[inline] + pub fn take_range(&mut self) -> Range { + self.range.take().unwrap_or_else(Range::default) + } + #[inline] + pub fn clear_crc32(&mut self) { + self.crc32 = 0 + } + #[inline] + pub fn set_crc32(&mut self, v: u32) { + self.crc32 = v; + } + #[inline] + pub fn get_crc32(&self) -> u32 { + self.crc32 + } + #[inline] + pub fn clear_length(&mut self) { + self.length = 0 + } + #[inline] + pub fn set_length(&mut self, v: u64) { + self.length = v; + } + #[inline] + pub fn get_length(&self) -> u64 { + self.length + } + #[inline] + pub fn clear_cf_name(&mut self) { + self.cf_name.clear(); + } + #[inline] + pub fn set_cf_name(&mut self, v: std::string::String) { + self.cf_name = v; + } + #[inline] + pub fn get_cf_name(&self) -> &str { + &self.cf_name + } + #[inline] + pub fn mut_cf_name(&mut self) -> &mut std::string::String { + &mut self.cf_name + } + #[inline] + pub fn take_cf_name(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf_name, ::std::string::String::new()) + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn has_region_epoch(&self) -> bool { + self.region_epoch.is_some() + } + #[inline] + pub fn clear_region_epoch(&mut self) { + self.region_epoch = ::std::option::Option::None + } + #[inline] + pub fn set_region_epoch(&mut self, v: super::metapb::RegionEpoch) { + self.region_epoch = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_epoch(&self) -> &super::metapb::RegionEpoch { + match self.region_epoch.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_epoch(&mut self) -> &mut super::metapb::RegionEpoch { + if self.region_epoch.is_none() { + self.region_epoch = ::std::option::Option::Some(super::metapb::RegionEpoch::default()); + } + self.region_epoch.as_mut().unwrap() + } + #[inline] + pub fn take_region_epoch(&mut self) -> super::metapb::RegionEpoch { + self.region_epoch + .take() + .unwrap_or_else(super::metapb::RegionEpoch::default) + } } -impl ::protobuf::Clear for SstMeta {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for SstMeta { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for SstMeta {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SstMeta { - ::lazy_static::lazy_static! { - static ref INSTANCE: SstMeta = SstMeta::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for SstMeta { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SstMeta { + ::lazy_static::lazy_static! { + static ref INSTANCE: SstMeta = SstMeta::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl UploadRequest { -pub fn new_() -> UploadRequest { ::std::default::Default::default() } + pub fn new_() -> UploadRequest { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for UploadRequest {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for UploadRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for UploadRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static UploadRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: UploadRequest = UploadRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for UploadRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static UploadRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: UploadRequest = UploadRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl UploadResponse { -pub fn new_() -> UploadResponse { ::std::default::Default::default() } + pub fn new_() -> UploadResponse { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for UploadResponse {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for UploadResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for UploadResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static UploadResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: UploadResponse = UploadResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for UploadResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static UploadResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: UploadResponse = UploadResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl IngestRequest { -pub fn new_() -> IngestRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: super :: kvrpcpb :: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &super :: kvrpcpb :: Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut super :: kvrpcpb :: Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(super :: kvrpcpb :: Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> super :: kvrpcpb :: Context { self.context.take().unwrap_or_else(super :: kvrpcpb :: Context::default) } -#[inline] pub fn has_sst(&self) -> bool { self.sst.is_some() } -#[inline] pub fn clear_sst(&mut self) { self.sst = ::std::option::Option::None } -#[inline] pub fn set_sst(&mut self, v: SstMeta) { self.sst = ::std::option::Option::Some(v); } -#[inline] pub fn get_sst(&self) -> &SstMeta { match self.sst.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_sst(&mut self) -> &mut SstMeta { if self.sst.is_none() { - self.sst = ::std::option::Option::Some(SstMeta::default()); - } - self.sst.as_mut().unwrap() } -#[inline] pub fn take_sst(&mut self) -> SstMeta { self.sst.take().unwrap_or_else(SstMeta::default) } + pub fn new_() -> IngestRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: super::kvrpcpb::Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &super::kvrpcpb::Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut super::kvrpcpb::Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(super::kvrpcpb::Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> super::kvrpcpb::Context { + self.context + .take() + .unwrap_or_else(super::kvrpcpb::Context::default) + } + #[inline] + pub fn has_sst(&self) -> bool { + self.sst.is_some() + } + #[inline] + pub fn clear_sst(&mut self) { + self.sst = ::std::option::Option::None + } + #[inline] + pub fn set_sst(&mut self, v: SstMeta) { + self.sst = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_sst(&self) -> &SstMeta { + match self.sst.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_sst(&mut self) -> &mut SstMeta { + if self.sst.is_none() { + self.sst = ::std::option::Option::Some(SstMeta::default()); + } + self.sst.as_mut().unwrap() + } + #[inline] + pub fn take_sst(&mut self) -> SstMeta { + self.sst.take().unwrap_or_else(SstMeta::default) + } } -impl ::protobuf::Clear for IngestRequest {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for IngestRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for IngestRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static IngestRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: IngestRequest = IngestRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for IngestRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static IngestRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: IngestRequest = IngestRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl IngestResponse { -pub fn new_() -> IngestResponse { ::std::default::Default::default() } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: super :: errorpb :: Error) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &super :: errorpb :: Error { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut super :: errorpb :: Error { if self.error.is_none() { - self.error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> super :: errorpb :: Error { self.error.take().unwrap_or_else(super :: errorpb :: Error::default) } + pub fn new_() -> IngestResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: super::errorpb::Error) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &super::errorpb::Error { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut super::errorpb::Error { + if self.error.is_none() { + self.error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> super::errorpb::Error { + self.error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } } -impl ::protobuf::Clear for IngestResponse {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for IngestResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for IngestResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static IngestResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: IngestResponse = IngestResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for IngestResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static IngestResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: IngestResponse = IngestResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactRequest { -pub fn new_() -> CompactRequest { ::std::default::Default::default() } -#[inline] pub fn has_range(&self) -> bool { self.range.is_some() } -#[inline] pub fn clear_range(&mut self) { self.range = ::std::option::Option::None } -#[inline] pub fn set_range(&mut self, v: Range) { self.range = ::std::option::Option::Some(v); } -#[inline] pub fn get_range(&self) -> &Range { match self.range.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_range(&mut self) -> &mut Range { if self.range.is_none() { - self.range = ::std::option::Option::Some(Range::default()); - } - self.range.as_mut().unwrap() } -#[inline] pub fn take_range(&mut self) -> Range { self.range.take().unwrap_or_else(Range::default) } -#[inline] pub fn clear_output_level(&mut self) { self.output_level = 0 } -#[inline] pub fn set_output_level(&mut self, v: i32) { self.output_level = v; } -#[inline] pub fn get_output_level(&self) -> i32 { self.output_level } + pub fn new_() -> CompactRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_range(&self) -> bool { + self.range.is_some() + } + #[inline] + pub fn clear_range(&mut self) { + self.range = ::std::option::Option::None + } + #[inline] + pub fn set_range(&mut self, v: Range) { + self.range = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_range(&self) -> &Range { + match self.range.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_range(&mut self) -> &mut Range { + if self.range.is_none() { + self.range = ::std::option::Option::Some(Range::default()); + } + self.range.as_mut().unwrap() + } + #[inline] + pub fn take_range(&mut self) -> Range { + self.range.take().unwrap_or_else(Range::default) + } + #[inline] + pub fn clear_output_level(&mut self) { + self.output_level = 0 + } + #[inline] + pub fn set_output_level(&mut self, v: i32) { + self.output_level = v; + } + #[inline] + pub fn get_output_level(&self) -> i32 { + self.output_level + } } -impl ::protobuf::Clear for CompactRequest {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CompactRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CompactRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactRequest = CompactRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for CompactRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactRequest = CompactRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactResponse { -pub fn new_() -> CompactResponse { ::std::default::Default::default() } + pub fn new_() -> CompactResponse { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for CompactResponse {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for CompactResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for CompactResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactResponse = CompactResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) +impl ::protobuf::Message for CompactResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactResponse = CompactResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SwitchMode { -pub fn values() -> &'static [Self] { -static VALUES: &'static [SwitchMode] = &[ -SwitchMode::Normal, -SwitchMode::Import, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [SwitchMode] = &[SwitchMode::Normal, SwitchMode::Import]; + VALUES + } } diff --git a/src/prost/wrapper_kvrpcpb.rs b/src/prost/wrapper_kvrpcpb.rs index 3b0e24b69..46c10d095 100644 --- a/src/prost/wrapper_kvrpcpb.rs +++ b/src/prost/wrapper_kvrpcpb.rs @@ -1,4218 +1,10269 @@ // Generated file, please don't edit manually. impl LockInfo { -pub fn new_() -> LockInfo { ::std::default::Default::default() } -#[inline] pub fn clear_primary_lock(&mut self) { self.primary_lock.clear(); } -#[inline] pub fn set_primary_lock(&mut self, v: std :: vec :: Vec < u8 >) { self.primary_lock = v; } -#[inline] pub fn get_primary_lock(&self) -> &[u8] { &self.primary_lock } -#[inline] pub fn mut_primary_lock(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.primary_lock } -#[inline] pub fn take_primary_lock(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.primary_lock, ::std::vec::Vec::new()) } -#[inline] pub fn clear_lock_version(&mut self) { self.lock_version = 0 } -#[inline] pub fn set_lock_version(&mut self, v: u64) { self.lock_version = v; } -#[inline] pub fn get_lock_version(&self) -> u64 { self.lock_version } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_lock_ttl(&mut self) { self.lock_ttl = 0 } -#[inline] pub fn set_lock_ttl(&mut self, v: u64) { self.lock_ttl = v; } -#[inline] pub fn get_lock_ttl(&self) -> u64 { self.lock_ttl } -#[inline] pub fn clear_txn_size(&mut self) { self.txn_size = 0 } -#[inline] pub fn set_txn_size(&mut self, v: u64) { self.txn_size = v; } -#[inline] pub fn get_txn_size(&self) -> u64 { self.txn_size } -} -impl ::protobuf::Clear for LockInfo {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for LockInfo {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static LockInfo { - ::lazy_static::lazy_static! { - static ref INSTANCE: LockInfo = LockInfo::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> LockInfo { + ::std::default::Default::default() + } + #[inline] + pub fn clear_primary_lock(&mut self) { + self.primary_lock.clear(); + } + #[inline] + pub fn set_primary_lock(&mut self, v: std::vec::Vec) { + self.primary_lock = v; + } + #[inline] + pub fn get_primary_lock(&self) -> &[u8] { + &self.primary_lock + } + #[inline] + pub fn mut_primary_lock(&mut self) -> &mut std::vec::Vec { + &mut self.primary_lock + } + #[inline] + pub fn take_primary_lock(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.primary_lock, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_lock_version(&mut self) { + self.lock_version = 0 + } + #[inline] + pub fn set_lock_version(&mut self, v: u64) { + self.lock_version = v; + } + #[inline] + pub fn get_lock_version(&self) -> u64 { + self.lock_version + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_lock_ttl(&mut self) { + self.lock_ttl = 0 + } + #[inline] + pub fn set_lock_ttl(&mut self, v: u64) { + self.lock_ttl = v; + } + #[inline] + pub fn get_lock_ttl(&self) -> u64 { + self.lock_ttl + } + #[inline] + pub fn clear_txn_size(&mut self) { + self.txn_size = 0 + } + #[inline] + pub fn set_txn_size(&mut self, v: u64) { + self.txn_size = v; + } + #[inline] + pub fn get_txn_size(&self) -> u64 { + self.txn_size + } +} +impl ::protobuf::Clear for LockInfo { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for LockInfo { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static LockInfo { + ::lazy_static::lazy_static! { + static ref INSTANCE: LockInfo = LockInfo::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AlreadyExist { -pub fn new_() -> AlreadyExist { ::std::default::Default::default() } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for AlreadyExist {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AlreadyExist {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AlreadyExist { - ::lazy_static::lazy_static! { - static ref INSTANCE: AlreadyExist = AlreadyExist::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AlreadyExist { + ::std::default::Default::default() + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for AlreadyExist { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AlreadyExist { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AlreadyExist { + ::lazy_static::lazy_static! { + static ref INSTANCE: AlreadyExist = AlreadyExist::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl KeyError { -pub fn new_() -> KeyError { ::std::default::Default::default() } -#[inline] pub fn has_locked(&self) -> bool { self.locked.is_some() } -#[inline] pub fn clear_locked(&mut self) { self.locked = ::std::option::Option::None } -#[inline] pub fn set_locked(&mut self, v: LockInfo) { self.locked = ::std::option::Option::Some(v); } -#[inline] pub fn get_locked(&self) -> &LockInfo { match self.locked.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_locked(&mut self) -> &mut LockInfo { if self.locked.is_none() { - self.locked = ::std::option::Option::Some(LockInfo::default()); - } - self.locked.as_mut().unwrap() } -#[inline] pub fn take_locked(&mut self) -> LockInfo { self.locked.take().unwrap_or_else(LockInfo::default) } -#[inline] pub fn clear_retryable(&mut self) { self.retryable.clear(); } -#[inline] pub fn set_retryable(&mut self, v: std :: string :: String) { self.retryable = v; } -#[inline] pub fn get_retryable(&self) -> &str { &self.retryable } -#[inline] pub fn mut_retryable(&mut self) -> &mut std :: string :: String { &mut self.retryable } -#[inline] pub fn take_retryable(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.retryable, ::std::string::String::new()) } -#[inline] pub fn clear_abort(&mut self) { self.abort.clear(); } -#[inline] pub fn set_abort(&mut self, v: std :: string :: String) { self.abort = v; } -#[inline] pub fn get_abort(&self) -> &str { &self.abort } -#[inline] pub fn mut_abort(&mut self) -> &mut std :: string :: String { &mut self.abort } -#[inline] pub fn take_abort(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.abort, ::std::string::String::new()) } -#[inline] pub fn has_conflict(&self) -> bool { self.conflict.is_some() } -#[inline] pub fn clear_conflict(&mut self) { self.conflict = ::std::option::Option::None } -#[inline] pub fn set_conflict(&mut self, v: WriteConflict) { self.conflict = ::std::option::Option::Some(v); } -#[inline] pub fn get_conflict(&self) -> &WriteConflict { match self.conflict.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_conflict(&mut self) -> &mut WriteConflict { if self.conflict.is_none() { - self.conflict = ::std::option::Option::Some(WriteConflict::default()); - } - self.conflict.as_mut().unwrap() } -#[inline] pub fn take_conflict(&mut self) -> WriteConflict { self.conflict.take().unwrap_or_else(WriteConflict::default) } -#[inline] pub fn has_already_exist(&self) -> bool { self.already_exist.is_some() } -#[inline] pub fn clear_already_exist(&mut self) { self.already_exist = ::std::option::Option::None } -#[inline] pub fn set_already_exist(&mut self, v: AlreadyExist) { self.already_exist = ::std::option::Option::Some(v); } -#[inline] pub fn get_already_exist(&self) -> &AlreadyExist { match self.already_exist.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_already_exist(&mut self) -> &mut AlreadyExist { if self.already_exist.is_none() { - self.already_exist = ::std::option::Option::Some(AlreadyExist::default()); - } - self.already_exist.as_mut().unwrap() } -#[inline] pub fn take_already_exist(&mut self) -> AlreadyExist { self.already_exist.take().unwrap_or_else(AlreadyExist::default) } -#[inline] pub fn has_deadlock(&self) -> bool { self.deadlock.is_some() } -#[inline] pub fn clear_deadlock(&mut self) { self.deadlock = ::std::option::Option::None } -#[inline] pub fn set_deadlock(&mut self, v: Deadlock) { self.deadlock = ::std::option::Option::Some(v); } -#[inline] pub fn get_deadlock(&self) -> &Deadlock { match self.deadlock.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_deadlock(&mut self) -> &mut Deadlock { if self.deadlock.is_none() { - self.deadlock = ::std::option::Option::Some(Deadlock::default()); - } - self.deadlock.as_mut().unwrap() } -#[inline] pub fn take_deadlock(&mut self) -> Deadlock { self.deadlock.take().unwrap_or_else(Deadlock::default) } -} -impl ::protobuf::Clear for KeyError {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for KeyError {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static KeyError { - ::lazy_static::lazy_static! { - static ref INSTANCE: KeyError = KeyError::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> KeyError { + ::std::default::Default::default() + } + #[inline] + pub fn has_locked(&self) -> bool { + self.locked.is_some() + } + #[inline] + pub fn clear_locked(&mut self) { + self.locked = ::std::option::Option::None + } + #[inline] + pub fn set_locked(&mut self, v: LockInfo) { + self.locked = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_locked(&self) -> &LockInfo { + match self.locked.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_locked(&mut self) -> &mut LockInfo { + if self.locked.is_none() { + self.locked = ::std::option::Option::Some(LockInfo::default()); + } + self.locked.as_mut().unwrap() + } + #[inline] + pub fn take_locked(&mut self) -> LockInfo { + self.locked.take().unwrap_or_else(LockInfo::default) + } + #[inline] + pub fn clear_retryable(&mut self) { + self.retryable.clear(); + } + #[inline] + pub fn set_retryable(&mut self, v: std::string::String) { + self.retryable = v; + } + #[inline] + pub fn get_retryable(&self) -> &str { + &self.retryable + } + #[inline] + pub fn mut_retryable(&mut self) -> &mut std::string::String { + &mut self.retryable + } + #[inline] + pub fn take_retryable(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.retryable, ::std::string::String::new()) + } + #[inline] + pub fn clear_abort(&mut self) { + self.abort.clear(); + } + #[inline] + pub fn set_abort(&mut self, v: std::string::String) { + self.abort = v; + } + #[inline] + pub fn get_abort(&self) -> &str { + &self.abort + } + #[inline] + pub fn mut_abort(&mut self) -> &mut std::string::String { + &mut self.abort + } + #[inline] + pub fn take_abort(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.abort, ::std::string::String::new()) + } + #[inline] + pub fn has_conflict(&self) -> bool { + self.conflict.is_some() + } + #[inline] + pub fn clear_conflict(&mut self) { + self.conflict = ::std::option::Option::None + } + #[inline] + pub fn set_conflict(&mut self, v: WriteConflict) { + self.conflict = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_conflict(&self) -> &WriteConflict { + match self.conflict.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_conflict(&mut self) -> &mut WriteConflict { + if self.conflict.is_none() { + self.conflict = ::std::option::Option::Some(WriteConflict::default()); + } + self.conflict.as_mut().unwrap() + } + #[inline] + pub fn take_conflict(&mut self) -> WriteConflict { + self.conflict.take().unwrap_or_else(WriteConflict::default) + } + #[inline] + pub fn has_already_exist(&self) -> bool { + self.already_exist.is_some() + } + #[inline] + pub fn clear_already_exist(&mut self) { + self.already_exist = ::std::option::Option::None + } + #[inline] + pub fn set_already_exist(&mut self, v: AlreadyExist) { + self.already_exist = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_already_exist(&self) -> &AlreadyExist { + match self.already_exist.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_already_exist(&mut self) -> &mut AlreadyExist { + if self.already_exist.is_none() { + self.already_exist = ::std::option::Option::Some(AlreadyExist::default()); + } + self.already_exist.as_mut().unwrap() + } + #[inline] + pub fn take_already_exist(&mut self) -> AlreadyExist { + self.already_exist + .take() + .unwrap_or_else(AlreadyExist::default) + } + #[inline] + pub fn has_deadlock(&self) -> bool { + self.deadlock.is_some() + } + #[inline] + pub fn clear_deadlock(&mut self) { + self.deadlock = ::std::option::Option::None + } + #[inline] + pub fn set_deadlock(&mut self, v: Deadlock) { + self.deadlock = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_deadlock(&self) -> &Deadlock { + match self.deadlock.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_deadlock(&mut self) -> &mut Deadlock { + if self.deadlock.is_none() { + self.deadlock = ::std::option::Option::Some(Deadlock::default()); + } + self.deadlock.as_mut().unwrap() + } + #[inline] + pub fn take_deadlock(&mut self) -> Deadlock { + self.deadlock.take().unwrap_or_else(Deadlock::default) + } +} +impl ::protobuf::Clear for KeyError { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for KeyError { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static KeyError { + ::lazy_static::lazy_static! { + static ref INSTANCE: KeyError = KeyError::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl WriteConflict { -pub fn new_() -> WriteConflict { ::std::default::Default::default() } -#[inline] pub fn clear_start_ts(&mut self) { self.start_ts = 0 } -#[inline] pub fn set_start_ts(&mut self, v: u64) { self.start_ts = v; } -#[inline] pub fn get_start_ts(&self) -> u64 { self.start_ts } -#[inline] pub fn clear_conflict_ts(&mut self) { self.conflict_ts = 0 } -#[inline] pub fn set_conflict_ts(&mut self, v: u64) { self.conflict_ts = v; } -#[inline] pub fn get_conflict_ts(&self) -> u64 { self.conflict_ts } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_primary(&mut self) { self.primary.clear(); } -#[inline] pub fn set_primary(&mut self, v: std :: vec :: Vec < u8 >) { self.primary = v; } -#[inline] pub fn get_primary(&self) -> &[u8] { &self.primary } -#[inline] pub fn mut_primary(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.primary } -#[inline] pub fn take_primary(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.primary, ::std::vec::Vec::new()) } -#[inline] pub fn clear_conflict_commit_ts(&mut self) { self.conflict_commit_ts = 0 } -#[inline] pub fn set_conflict_commit_ts(&mut self, v: u64) { self.conflict_commit_ts = v; } -#[inline] pub fn get_conflict_commit_ts(&self) -> u64 { self.conflict_commit_ts } -} -impl ::protobuf::Clear for WriteConflict {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for WriteConflict {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static WriteConflict { - ::lazy_static::lazy_static! { - static ref INSTANCE: WriteConflict = WriteConflict::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> WriteConflict { + ::std::default::Default::default() + } + #[inline] + pub fn clear_start_ts(&mut self) { + self.start_ts = 0 + } + #[inline] + pub fn set_start_ts(&mut self, v: u64) { + self.start_ts = v; + } + #[inline] + pub fn get_start_ts(&self) -> u64 { + self.start_ts + } + #[inline] + pub fn clear_conflict_ts(&mut self) { + self.conflict_ts = 0 + } + #[inline] + pub fn set_conflict_ts(&mut self, v: u64) { + self.conflict_ts = v; + } + #[inline] + pub fn get_conflict_ts(&self) -> u64 { + self.conflict_ts + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_primary(&mut self) { + self.primary.clear(); + } + #[inline] + pub fn set_primary(&mut self, v: std::vec::Vec) { + self.primary = v; + } + #[inline] + pub fn get_primary(&self) -> &[u8] { + &self.primary + } + #[inline] + pub fn mut_primary(&mut self) -> &mut std::vec::Vec { + &mut self.primary + } + #[inline] + pub fn take_primary(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.primary, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_conflict_commit_ts(&mut self) { + self.conflict_commit_ts = 0 + } + #[inline] + pub fn set_conflict_commit_ts(&mut self, v: u64) { + self.conflict_commit_ts = v; + } + #[inline] + pub fn get_conflict_commit_ts(&self) -> u64 { + self.conflict_commit_ts + } +} +impl ::protobuf::Clear for WriteConflict { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for WriteConflict { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static WriteConflict { + ::lazy_static::lazy_static! { + static ref INSTANCE: WriteConflict = WriteConflict::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Deadlock { -pub fn new_() -> Deadlock { ::std::default::Default::default() } -#[inline] pub fn clear_lock_ts(&mut self) { self.lock_ts = 0 } -#[inline] pub fn set_lock_ts(&mut self, v: u64) { self.lock_ts = v; } -#[inline] pub fn get_lock_ts(&self) -> u64 { self.lock_ts } -#[inline] pub fn clear_lock_key(&mut self) { self.lock_key.clear(); } -#[inline] pub fn set_lock_key(&mut self, v: std :: vec :: Vec < u8 >) { self.lock_key = v; } -#[inline] pub fn get_lock_key(&self) -> &[u8] { &self.lock_key } -#[inline] pub fn mut_lock_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.lock_key } -#[inline] pub fn take_lock_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.lock_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_deadlock_key_hash(&mut self) { self.deadlock_key_hash = 0 } -#[inline] pub fn set_deadlock_key_hash(&mut self, v: u64) { self.deadlock_key_hash = v; } -#[inline] pub fn get_deadlock_key_hash(&self) -> u64 { self.deadlock_key_hash } -} -impl ::protobuf::Clear for Deadlock {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Deadlock {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Deadlock { - ::lazy_static::lazy_static! { - static ref INSTANCE: Deadlock = Deadlock::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Deadlock { + ::std::default::Default::default() + } + #[inline] + pub fn clear_lock_ts(&mut self) { + self.lock_ts = 0 + } + #[inline] + pub fn set_lock_ts(&mut self, v: u64) { + self.lock_ts = v; + } + #[inline] + pub fn get_lock_ts(&self) -> u64 { + self.lock_ts + } + #[inline] + pub fn clear_lock_key(&mut self) { + self.lock_key.clear(); + } + #[inline] + pub fn set_lock_key(&mut self, v: std::vec::Vec) { + self.lock_key = v; + } + #[inline] + pub fn get_lock_key(&self) -> &[u8] { + &self.lock_key + } + #[inline] + pub fn mut_lock_key(&mut self) -> &mut std::vec::Vec { + &mut self.lock_key + } + #[inline] + pub fn take_lock_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.lock_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_deadlock_key_hash(&mut self) { + self.deadlock_key_hash = 0 + } + #[inline] + pub fn set_deadlock_key_hash(&mut self, v: u64) { + self.deadlock_key_hash = v; + } + #[inline] + pub fn get_deadlock_key_hash(&self) -> u64 { + self.deadlock_key_hash + } +} +impl ::protobuf::Clear for Deadlock { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Deadlock { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Deadlock { + ::lazy_static::lazy_static! { + static ref INSTANCE: Deadlock = Deadlock::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Context { -pub fn new_() -> Context { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn has_region_epoch(&self) -> bool { self.region_epoch.is_some() } -#[inline] pub fn clear_region_epoch(&mut self) { self.region_epoch = ::std::option::Option::None } -#[inline] pub fn set_region_epoch(&mut self, v: super :: metapb :: RegionEpoch) { self.region_epoch = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_epoch(&self) -> &super :: metapb :: RegionEpoch { match self.region_epoch.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_epoch(&mut self) -> &mut super :: metapb :: RegionEpoch { if self.region_epoch.is_none() { - self.region_epoch = ::std::option::Option::Some(super :: metapb :: RegionEpoch::default()); - } - self.region_epoch.as_mut().unwrap() } -#[inline] pub fn take_region_epoch(&mut self) -> super :: metapb :: RegionEpoch { self.region_epoch.take().unwrap_or_else(super :: metapb :: RegionEpoch::default) } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn clear_term(&mut self) { self.term = 0 } -#[inline] pub fn set_term(&mut self, v: u64) { self.term = v; } -#[inline] pub fn get_term(&self) -> u64 { self.term } -#[inline] pub fn clear_priority(&mut self) { self.priority = 0 } -#[inline] pub fn set_priority_(&mut self, v: CommandPri) { self.priority = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_priority(&self) -> CommandPri { unsafe { ::std::mem::transmute::(self.priority) } } -#[inline] pub fn clear_isolation_level(&mut self) { self.isolation_level = 0 } -#[inline] pub fn set_isolation_level_(&mut self, v: IsolationLevel) { self.isolation_level = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_isolation_level(&self) -> IsolationLevel { unsafe { ::std::mem::transmute::(self.isolation_level) } } -#[inline] pub fn clear_not_fill_cache(&mut self) { self.not_fill_cache = false } -#[inline] pub fn set_not_fill_cache(&mut self, v: bool) { self.not_fill_cache = v; } -#[inline] pub fn get_not_fill_cache(&self) -> bool { self.not_fill_cache } -#[inline] pub fn clear_sync_log(&mut self) { self.sync_log = false } -#[inline] pub fn set_sync_log(&mut self, v: bool) { self.sync_log = v; } -#[inline] pub fn get_sync_log(&self) -> bool { self.sync_log } -#[inline] pub fn clear_handle_time(&mut self) { self.handle_time = false } -#[inline] pub fn set_handle_time(&mut self, v: bool) { self.handle_time = v; } -#[inline] pub fn get_handle_time(&self) -> bool { self.handle_time } -#[inline] pub fn clear_scan_detail(&mut self) { self.scan_detail = false } -#[inline] pub fn set_scan_detail(&mut self, v: bool) { self.scan_detail = v; } -#[inline] pub fn get_scan_detail(&self) -> bool { self.scan_detail } -} -impl ::protobuf::Clear for Context {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Context {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Context { - ::lazy_static::lazy_static! { - static ref INSTANCE: Context = Context::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Context { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn has_region_epoch(&self) -> bool { + self.region_epoch.is_some() + } + #[inline] + pub fn clear_region_epoch(&mut self) { + self.region_epoch = ::std::option::Option::None + } + #[inline] + pub fn set_region_epoch(&mut self, v: super::metapb::RegionEpoch) { + self.region_epoch = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_epoch(&self) -> &super::metapb::RegionEpoch { + match self.region_epoch.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_epoch(&mut self) -> &mut super::metapb::RegionEpoch { + if self.region_epoch.is_none() { + self.region_epoch = ::std::option::Option::Some(super::metapb::RegionEpoch::default()); + } + self.region_epoch.as_mut().unwrap() + } + #[inline] + pub fn take_region_epoch(&mut self) -> super::metapb::RegionEpoch { + self.region_epoch + .take() + .unwrap_or_else(super::metapb::RegionEpoch::default) + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn clear_term(&mut self) { + self.term = 0 + } + #[inline] + pub fn set_term(&mut self, v: u64) { + self.term = v; + } + #[inline] + pub fn get_term(&self) -> u64 { + self.term + } + #[inline] + pub fn clear_priority(&mut self) { + self.priority = 0 + } + #[inline] + pub fn set_priority_(&mut self, v: CommandPri) { + self.priority = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_priority(&self) -> CommandPri { + unsafe { ::std::mem::transmute::(self.priority) } + } + #[inline] + pub fn clear_isolation_level(&mut self) { + self.isolation_level = 0 + } + #[inline] + pub fn set_isolation_level_(&mut self, v: IsolationLevel) { + self.isolation_level = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_isolation_level(&self) -> IsolationLevel { + unsafe { ::std::mem::transmute::(self.isolation_level) } + } + #[inline] + pub fn clear_not_fill_cache(&mut self) { + self.not_fill_cache = false + } + #[inline] + pub fn set_not_fill_cache(&mut self, v: bool) { + self.not_fill_cache = v; + } + #[inline] + pub fn get_not_fill_cache(&self) -> bool { + self.not_fill_cache + } + #[inline] + pub fn clear_sync_log(&mut self) { + self.sync_log = false + } + #[inline] + pub fn set_sync_log(&mut self, v: bool) { + self.sync_log = v; + } + #[inline] + pub fn get_sync_log(&self) -> bool { + self.sync_log + } + #[inline] + pub fn clear_handle_time(&mut self) { + self.handle_time = false + } + #[inline] + pub fn set_handle_time(&mut self, v: bool) { + self.handle_time = v; + } + #[inline] + pub fn get_handle_time(&self) -> bool { + self.handle_time + } + #[inline] + pub fn clear_scan_detail(&mut self) { + self.scan_detail = false + } + #[inline] + pub fn set_scan_detail(&mut self, v: bool) { + self.scan_detail = v; + } + #[inline] + pub fn get_scan_detail(&self) -> bool { + self.scan_detail + } +} +impl ::protobuf::Clear for Context { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Context { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Context { + ::lazy_static::lazy_static! { + static ref INSTANCE: Context = Context::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl HandleTime { -pub fn new_() -> HandleTime { ::std::default::Default::default() } -#[inline] pub fn clear_wait_ms(&mut self) { self.wait_ms = 0 } -#[inline] pub fn set_wait_ms(&mut self, v: i64) { self.wait_ms = v; } -#[inline] pub fn get_wait_ms(&self) -> i64 { self.wait_ms } -#[inline] pub fn clear_process_ms(&mut self) { self.process_ms = 0 } -#[inline] pub fn set_process_ms(&mut self, v: i64) { self.process_ms = v; } -#[inline] pub fn get_process_ms(&self) -> i64 { self.process_ms } -} -impl ::protobuf::Clear for HandleTime {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for HandleTime {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static HandleTime { - ::lazy_static::lazy_static! { - static ref INSTANCE: HandleTime = HandleTime::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> HandleTime { + ::std::default::Default::default() + } + #[inline] + pub fn clear_wait_ms(&mut self) { + self.wait_ms = 0 + } + #[inline] + pub fn set_wait_ms(&mut self, v: i64) { + self.wait_ms = v; + } + #[inline] + pub fn get_wait_ms(&self) -> i64 { + self.wait_ms + } + #[inline] + pub fn clear_process_ms(&mut self) { + self.process_ms = 0 + } + #[inline] + pub fn set_process_ms(&mut self, v: i64) { + self.process_ms = v; + } + #[inline] + pub fn get_process_ms(&self) -> i64 { + self.process_ms + } +} +impl ::protobuf::Clear for HandleTime { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for HandleTime { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static HandleTime { + ::lazy_static::lazy_static! { + static ref INSTANCE: HandleTime = HandleTime::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanInfo { -pub fn new_() -> ScanInfo { ::std::default::Default::default() } -#[inline] pub fn clear_total(&mut self) { self.total = 0 } -#[inline] pub fn set_total(&mut self, v: i64) { self.total = v; } -#[inline] pub fn get_total(&self) -> i64 { self.total } -#[inline] pub fn clear_processed(&mut self) { self.processed = 0 } -#[inline] pub fn set_processed(&mut self, v: i64) { self.processed = v; } -#[inline] pub fn get_processed(&self) -> i64 { self.processed } -} -impl ::protobuf::Clear for ScanInfo {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanInfo {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanInfo { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanInfo = ScanInfo::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanInfo { + ::std::default::Default::default() + } + #[inline] + pub fn clear_total(&mut self) { + self.total = 0 + } + #[inline] + pub fn set_total(&mut self, v: i64) { + self.total = v; + } + #[inline] + pub fn get_total(&self) -> i64 { + self.total + } + #[inline] + pub fn clear_processed(&mut self) { + self.processed = 0 + } + #[inline] + pub fn set_processed(&mut self, v: i64) { + self.processed = v; + } + #[inline] + pub fn get_processed(&self) -> i64 { + self.processed + } +} +impl ::protobuf::Clear for ScanInfo { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanInfo { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanInfo { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanInfo = ScanInfo::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanDetail { -pub fn new_() -> ScanDetail { ::std::default::Default::default() } -#[inline] pub fn has_write(&self) -> bool { self.write.is_some() } -#[inline] pub fn clear_write(&mut self) { self.write = ::std::option::Option::None } -#[inline] pub fn set_write(&mut self, v: ScanInfo) { self.write = ::std::option::Option::Some(v); } -#[inline] pub fn get_write(&self) -> &ScanInfo { match self.write.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_write(&mut self) -> &mut ScanInfo { if self.write.is_none() { - self.write = ::std::option::Option::Some(ScanInfo::default()); - } - self.write.as_mut().unwrap() } -#[inline] pub fn take_write(&mut self) -> ScanInfo { self.write.take().unwrap_or_else(ScanInfo::default) } -#[inline] pub fn has_lock(&self) -> bool { self.lock.is_some() } -#[inline] pub fn clear_lock(&mut self) { self.lock = ::std::option::Option::None } -#[inline] pub fn set_lock(&mut self, v: ScanInfo) { self.lock = ::std::option::Option::Some(v); } -#[inline] pub fn get_lock(&self) -> &ScanInfo { match self.lock.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_lock(&mut self) -> &mut ScanInfo { if self.lock.is_none() { - self.lock = ::std::option::Option::Some(ScanInfo::default()); - } - self.lock.as_mut().unwrap() } -#[inline] pub fn take_lock(&mut self) -> ScanInfo { self.lock.take().unwrap_or_else(ScanInfo::default) } -#[inline] pub fn has_data(&self) -> bool { self.data.is_some() } -#[inline] pub fn clear_data(&mut self) { self.data = ::std::option::Option::None } -#[inline] pub fn set_data(&mut self, v: ScanInfo) { self.data = ::std::option::Option::Some(v); } -#[inline] pub fn get_data(&self) -> &ScanInfo { match self.data.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_data(&mut self) -> &mut ScanInfo { if self.data.is_none() { - self.data = ::std::option::Option::Some(ScanInfo::default()); - } - self.data.as_mut().unwrap() } -#[inline] pub fn take_data(&mut self) -> ScanInfo { self.data.take().unwrap_or_else(ScanInfo::default) } -} -impl ::protobuf::Clear for ScanDetail {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanDetail {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanDetail { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanDetail = ScanDetail::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanDetail { + ::std::default::Default::default() + } + #[inline] + pub fn has_write(&self) -> bool { + self.write.is_some() + } + #[inline] + pub fn clear_write(&mut self) { + self.write = ::std::option::Option::None + } + #[inline] + pub fn set_write(&mut self, v: ScanInfo) { + self.write = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_write(&self) -> &ScanInfo { + match self.write.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_write(&mut self) -> &mut ScanInfo { + if self.write.is_none() { + self.write = ::std::option::Option::Some(ScanInfo::default()); + } + self.write.as_mut().unwrap() + } + #[inline] + pub fn take_write(&mut self) -> ScanInfo { + self.write.take().unwrap_or_else(ScanInfo::default) + } + #[inline] + pub fn has_lock(&self) -> bool { + self.lock.is_some() + } + #[inline] + pub fn clear_lock(&mut self) { + self.lock = ::std::option::Option::None + } + #[inline] + pub fn set_lock(&mut self, v: ScanInfo) { + self.lock = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_lock(&self) -> &ScanInfo { + match self.lock.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_lock(&mut self) -> &mut ScanInfo { + if self.lock.is_none() { + self.lock = ::std::option::Option::Some(ScanInfo::default()); + } + self.lock.as_mut().unwrap() + } + #[inline] + pub fn take_lock(&mut self) -> ScanInfo { + self.lock.take().unwrap_or_else(ScanInfo::default) + } + #[inline] + pub fn has_data(&self) -> bool { + self.data.is_some() + } + #[inline] + pub fn clear_data(&mut self) { + self.data = ::std::option::Option::None + } + #[inline] + pub fn set_data(&mut self, v: ScanInfo) { + self.data = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_data(&self) -> &ScanInfo { + match self.data.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_data(&mut self) -> &mut ScanInfo { + if self.data.is_none() { + self.data = ::std::option::Option::Some(ScanInfo::default()); + } + self.data.as_mut().unwrap() + } + #[inline] + pub fn take_data(&mut self) -> ScanInfo { + self.data.take().unwrap_or_else(ScanInfo::default) + } +} +impl ::protobuf::Clear for ScanDetail { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanDetail { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanDetail { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanDetail = ScanDetail::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ExecDetails { -pub fn new_() -> ExecDetails { ::std::default::Default::default() } -#[inline] pub fn has_handle_time(&self) -> bool { self.handle_time.is_some() } -#[inline] pub fn clear_handle_time(&mut self) { self.handle_time = ::std::option::Option::None } -#[inline] pub fn set_handle_time(&mut self, v: HandleTime) { self.handle_time = ::std::option::Option::Some(v); } -#[inline] pub fn get_handle_time(&self) -> &HandleTime { match self.handle_time.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_handle_time(&mut self) -> &mut HandleTime { if self.handle_time.is_none() { - self.handle_time = ::std::option::Option::Some(HandleTime::default()); - } - self.handle_time.as_mut().unwrap() } -#[inline] pub fn take_handle_time(&mut self) -> HandleTime { self.handle_time.take().unwrap_or_else(HandleTime::default) } -#[inline] pub fn has_scan_detail(&self) -> bool { self.scan_detail.is_some() } -#[inline] pub fn clear_scan_detail(&mut self) { self.scan_detail = ::std::option::Option::None } -#[inline] pub fn set_scan_detail(&mut self, v: ScanDetail) { self.scan_detail = ::std::option::Option::Some(v); } -#[inline] pub fn get_scan_detail(&self) -> &ScanDetail { match self.scan_detail.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_scan_detail(&mut self) -> &mut ScanDetail { if self.scan_detail.is_none() { - self.scan_detail = ::std::option::Option::Some(ScanDetail::default()); - } - self.scan_detail.as_mut().unwrap() } -#[inline] pub fn take_scan_detail(&mut self) -> ScanDetail { self.scan_detail.take().unwrap_or_else(ScanDetail::default) } -} -impl ::protobuf::Clear for ExecDetails {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ExecDetails {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ExecDetails { - ::lazy_static::lazy_static! { - static ref INSTANCE: ExecDetails = ExecDetails::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ExecDetails { + ::std::default::Default::default() + } + #[inline] + pub fn has_handle_time(&self) -> bool { + self.handle_time.is_some() + } + #[inline] + pub fn clear_handle_time(&mut self) { + self.handle_time = ::std::option::Option::None + } + #[inline] + pub fn set_handle_time(&mut self, v: HandleTime) { + self.handle_time = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_handle_time(&self) -> &HandleTime { + match self.handle_time.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_handle_time(&mut self) -> &mut HandleTime { + if self.handle_time.is_none() { + self.handle_time = ::std::option::Option::Some(HandleTime::default()); + } + self.handle_time.as_mut().unwrap() + } + #[inline] + pub fn take_handle_time(&mut self) -> HandleTime { + self.handle_time.take().unwrap_or_else(HandleTime::default) + } + #[inline] + pub fn has_scan_detail(&self) -> bool { + self.scan_detail.is_some() + } + #[inline] + pub fn clear_scan_detail(&mut self) { + self.scan_detail = ::std::option::Option::None + } + #[inline] + pub fn set_scan_detail(&mut self, v: ScanDetail) { + self.scan_detail = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_scan_detail(&self) -> &ScanDetail { + match self.scan_detail.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_scan_detail(&mut self) -> &mut ScanDetail { + if self.scan_detail.is_none() { + self.scan_detail = ::std::option::Option::Some(ScanDetail::default()); + } + self.scan_detail.as_mut().unwrap() + } + #[inline] + pub fn take_scan_detail(&mut self) -> ScanDetail { + self.scan_detail.take().unwrap_or_else(ScanDetail::default) + } +} +impl ::protobuf::Clear for ExecDetails { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ExecDetails { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ExecDetails { + ::lazy_static::lazy_static! { + static ref INSTANCE: ExecDetails = ExecDetails::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetRequest { -pub fn new_() -> GetRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_version(&mut self) { self.version = 0 } -#[inline] pub fn set_version(&mut self, v: u64) { self.version = v; } -#[inline] pub fn get_version(&self) -> u64 { self.version } -} -impl ::protobuf::Clear for GetRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRequest = GetRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_version(&mut self) { + self.version = 0 + } + #[inline] + pub fn set_version(&mut self, v: u64) { + self.version = v; + } + #[inline] + pub fn get_version(&self) -> u64 { + self.version + } +} +impl ::protobuf::Clear for GetRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRequest = GetRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetResponse { -pub fn new_() -> GetResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetResponse = GetResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetResponse = GetResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanRequest { -pub fn new_() -> ScanRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_limit(&mut self) { self.limit = 0 } -#[inline] pub fn set_limit(&mut self, v: u32) { self.limit = v; } -#[inline] pub fn get_limit(&self) -> u32 { self.limit } -#[inline] pub fn clear_version(&mut self) { self.version = 0 } -#[inline] pub fn set_version(&mut self, v: u64) { self.version = v; } -#[inline] pub fn get_version(&self) -> u64 { self.version } -#[inline] pub fn clear_key_only(&mut self) { self.key_only = false } -#[inline] pub fn set_key_only(&mut self, v: bool) { self.key_only = v; } -#[inline] pub fn get_key_only(&self) -> bool { self.key_only } -#[inline] pub fn clear_reverse(&mut self) { self.reverse = false } -#[inline] pub fn set_reverse(&mut self, v: bool) { self.reverse = v; } -#[inline] pub fn get_reverse(&self) -> bool { self.reverse } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for ScanRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanRequest = ScanRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_limit(&mut self) { + self.limit = 0 + } + #[inline] + pub fn set_limit(&mut self, v: u32) { + self.limit = v; + } + #[inline] + pub fn get_limit(&self) -> u32 { + self.limit + } + #[inline] + pub fn clear_version(&mut self) { + self.version = 0 + } + #[inline] + pub fn set_version(&mut self, v: u64) { + self.version = v; + } + #[inline] + pub fn get_version(&self) -> u64 { + self.version + } + #[inline] + pub fn clear_key_only(&mut self) { + self.key_only = false + } + #[inline] + pub fn set_key_only(&mut self, v: bool) { + self.key_only = v; + } + #[inline] + pub fn get_key_only(&self) -> bool { + self.key_only + } + #[inline] + pub fn clear_reverse(&mut self) { + self.reverse = false + } + #[inline] + pub fn set_reverse(&mut self, v: bool) { + self.reverse = v; + } + #[inline] + pub fn get_reverse(&self) -> bool { + self.reverse + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for ScanRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanRequest = ScanRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl KvPair { -pub fn new_() -> KvPair { ::std::default::Default::default() } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for KvPair {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for KvPair {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static KvPair { - ::lazy_static::lazy_static! { - static ref INSTANCE: KvPair = KvPair::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> KvPair { + ::std::default::Default::default() + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for KvPair { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for KvPair { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static KvPair { + ::lazy_static::lazy_static! { + static ref INSTANCE: KvPair = KvPair::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanResponse { -pub fn new_() -> ScanResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_pairs(&mut self) { self.pairs.clear(); } -#[inline] pub fn set_pairs(&mut self, v: :: std :: vec :: Vec < KvPair >) { self.pairs = v; } -#[inline] pub fn get_pairs(&self) -> &:: std :: vec :: Vec < KvPair > { &self.pairs } -#[inline] pub fn mut_pairs(&mut self) -> &mut :: std :: vec :: Vec < KvPair > { &mut self.pairs } -#[inline] pub fn take_pairs(&mut self) -> :: std :: vec :: Vec < KvPair > { ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for ScanResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanResponse = ScanResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_pairs(&mut self) { + self.pairs.clear(); + } + #[inline] + pub fn set_pairs(&mut self, v: ::std::vec::Vec) { + self.pairs = v; + } + #[inline] + pub fn get_pairs(&self) -> &::std::vec::Vec { + &self.pairs + } + #[inline] + pub fn mut_pairs(&mut self) -> &mut ::std::vec::Vec { + &mut self.pairs + } + #[inline] + pub fn take_pairs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for ScanResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanResponse = ScanResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Mutation { -pub fn new_() -> Mutation { ::std::default::Default::default() } -#[inline] pub fn clear_op(&mut self) { self.op = 0 } -#[inline] pub fn set_op_(&mut self, v: Op) { self.op = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_op(&self) -> Op { unsafe { ::std::mem::transmute::(self.op) } } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -#[inline] pub fn clear_assertion(&mut self) { self.assertion = 0 } -#[inline] pub fn set_assertion_(&mut self, v: Assertion) { self.assertion = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_assertion(&self) -> Assertion { unsafe { ::std::mem::transmute::(self.assertion) } } -} -impl ::protobuf::Clear for Mutation {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Mutation {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Mutation { - ::lazy_static::lazy_static! { - static ref INSTANCE: Mutation = Mutation::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Mutation { + ::std::default::Default::default() + } + #[inline] + pub fn clear_op(&mut self) { + self.op = 0 + } + #[inline] + pub fn set_op_(&mut self, v: Op) { + self.op = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_op(&self) -> Op { + unsafe { ::std::mem::transmute::(self.op) } + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_assertion(&mut self) { + self.assertion = 0 + } + #[inline] + pub fn set_assertion_(&mut self, v: Assertion) { + self.assertion = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_assertion(&self) -> Assertion { + unsafe { ::std::mem::transmute::(self.assertion) } + } +} +impl ::protobuf::Clear for Mutation { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Mutation { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Mutation { + ::lazy_static::lazy_static! { + static ref INSTANCE: Mutation = Mutation::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PrewriteRequest { -pub fn new_() -> PrewriteRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_mutations(&mut self) { self.mutations.clear(); } -#[inline] pub fn set_mutations(&mut self, v: :: std :: vec :: Vec < Mutation >) { self.mutations = v; } -#[inline] pub fn get_mutations(&self) -> &:: std :: vec :: Vec < Mutation > { &self.mutations } -#[inline] pub fn mut_mutations(&mut self) -> &mut :: std :: vec :: Vec < Mutation > { &mut self.mutations } -#[inline] pub fn take_mutations(&mut self) -> :: std :: vec :: Vec < Mutation > { ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) } -#[inline] pub fn clear_primary_lock(&mut self) { self.primary_lock.clear(); } -#[inline] pub fn set_primary_lock(&mut self, v: std :: vec :: Vec < u8 >) { self.primary_lock = v; } -#[inline] pub fn get_primary_lock(&self) -> &[u8] { &self.primary_lock } -#[inline] pub fn mut_primary_lock(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.primary_lock } -#[inline] pub fn take_primary_lock(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.primary_lock, ::std::vec::Vec::new()) } -#[inline] pub fn clear_start_version(&mut self) { self.start_version = 0 } -#[inline] pub fn set_start_version(&mut self, v: u64) { self.start_version = v; } -#[inline] pub fn get_start_version(&self) -> u64 { self.start_version } -#[inline] pub fn clear_lock_ttl(&mut self) { self.lock_ttl = 0 } -#[inline] pub fn set_lock_ttl(&mut self, v: u64) { self.lock_ttl = v; } -#[inline] pub fn get_lock_ttl(&self) -> u64 { self.lock_ttl } -#[inline] pub fn clear_skip_constraint_check(&mut self) { self.skip_constraint_check = false } -#[inline] pub fn set_skip_constraint_check(&mut self, v: bool) { self.skip_constraint_check = v; } -#[inline] pub fn get_skip_constraint_check(&self) -> bool { self.skip_constraint_check } -#[inline] pub fn clear_is_pessimistic_lock(&mut self) { self.is_pessimistic_lock.clear(); } -#[inline] pub fn set_is_pessimistic_lock(&mut self, v: :: std :: vec :: Vec < bool >) { self.is_pessimistic_lock = v; } -#[inline] pub fn get_is_pessimistic_lock(&self) -> &:: std :: vec :: Vec < bool > { &self.is_pessimistic_lock } -#[inline] pub fn mut_is_pessimistic_lock(&mut self) -> &mut :: std :: vec :: Vec < bool > { &mut self.is_pessimistic_lock } -#[inline] pub fn take_is_pessimistic_lock(&mut self) -> :: std :: vec :: Vec < bool > { ::std::mem::replace(&mut self.is_pessimistic_lock, ::std::vec::Vec::new()) } -#[inline] pub fn clear_txn_size(&mut self) { self.txn_size = 0 } -#[inline] pub fn set_txn_size(&mut self, v: u64) { self.txn_size = v; } -#[inline] pub fn get_txn_size(&self) -> u64 { self.txn_size } -#[inline] pub fn clear_for_update_ts(&mut self) { self.for_update_ts = 0 } -#[inline] pub fn set_for_update_ts(&mut self, v: u64) { self.for_update_ts = v; } -#[inline] pub fn get_for_update_ts(&self) -> u64 { self.for_update_ts } -} -impl ::protobuf::Clear for PrewriteRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PrewriteRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PrewriteRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PrewriteRequest = PrewriteRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PrewriteRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_mutations(&mut self) { + self.mutations.clear(); + } + #[inline] + pub fn set_mutations(&mut self, v: ::std::vec::Vec) { + self.mutations = v; + } + #[inline] + pub fn get_mutations(&self) -> &::std::vec::Vec { + &self.mutations + } + #[inline] + pub fn mut_mutations(&mut self) -> &mut ::std::vec::Vec { + &mut self.mutations + } + #[inline] + pub fn take_mutations(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_primary_lock(&mut self) { + self.primary_lock.clear(); + } + #[inline] + pub fn set_primary_lock(&mut self, v: std::vec::Vec) { + self.primary_lock = v; + } + #[inline] + pub fn get_primary_lock(&self) -> &[u8] { + &self.primary_lock + } + #[inline] + pub fn mut_primary_lock(&mut self) -> &mut std::vec::Vec { + &mut self.primary_lock + } + #[inline] + pub fn take_primary_lock(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.primary_lock, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_start_version(&mut self) { + self.start_version = 0 + } + #[inline] + pub fn set_start_version(&mut self, v: u64) { + self.start_version = v; + } + #[inline] + pub fn get_start_version(&self) -> u64 { + self.start_version + } + #[inline] + pub fn clear_lock_ttl(&mut self) { + self.lock_ttl = 0 + } + #[inline] + pub fn set_lock_ttl(&mut self, v: u64) { + self.lock_ttl = v; + } + #[inline] + pub fn get_lock_ttl(&self) -> u64 { + self.lock_ttl + } + #[inline] + pub fn clear_skip_constraint_check(&mut self) { + self.skip_constraint_check = false + } + #[inline] + pub fn set_skip_constraint_check(&mut self, v: bool) { + self.skip_constraint_check = v; + } + #[inline] + pub fn get_skip_constraint_check(&self) -> bool { + self.skip_constraint_check + } + #[inline] + pub fn clear_is_pessimistic_lock(&mut self) { + self.is_pessimistic_lock.clear(); + } + #[inline] + pub fn set_is_pessimistic_lock(&mut self, v: ::std::vec::Vec) { + self.is_pessimistic_lock = v; + } + #[inline] + pub fn get_is_pessimistic_lock(&self) -> &::std::vec::Vec { + &self.is_pessimistic_lock + } + #[inline] + pub fn mut_is_pessimistic_lock(&mut self) -> &mut ::std::vec::Vec { + &mut self.is_pessimistic_lock + } + #[inline] + pub fn take_is_pessimistic_lock(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.is_pessimistic_lock, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_txn_size(&mut self) { + self.txn_size = 0 + } + #[inline] + pub fn set_txn_size(&mut self, v: u64) { + self.txn_size = v; + } + #[inline] + pub fn get_txn_size(&self) -> u64 { + self.txn_size + } + #[inline] + pub fn clear_for_update_ts(&mut self) { + self.for_update_ts = 0 + } + #[inline] + pub fn set_for_update_ts(&mut self, v: u64) { + self.for_update_ts = v; + } + #[inline] + pub fn get_for_update_ts(&self) -> u64 { + self.for_update_ts + } +} +impl ::protobuf::Clear for PrewriteRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PrewriteRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PrewriteRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PrewriteRequest = PrewriteRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PrewriteResponse { -pub fn new_() -> PrewriteResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_errors(&mut self) { self.errors.clear(); } -#[inline] pub fn set_errors(&mut self, v: :: std :: vec :: Vec < KeyError >) { self.errors = v; } -#[inline] pub fn get_errors(&self) -> &:: std :: vec :: Vec < KeyError > { &self.errors } -#[inline] pub fn mut_errors(&mut self) -> &mut :: std :: vec :: Vec < KeyError > { &mut self.errors } -#[inline] pub fn take_errors(&mut self) -> :: std :: vec :: Vec < KeyError > { ::std::mem::replace(&mut self.errors, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for PrewriteResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PrewriteResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PrewriteResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PrewriteResponse = PrewriteResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PrewriteResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_errors(&mut self) { + self.errors.clear(); + } + #[inline] + pub fn set_errors(&mut self, v: ::std::vec::Vec) { + self.errors = v; + } + #[inline] + pub fn get_errors(&self) -> &::std::vec::Vec { + &self.errors + } + #[inline] + pub fn mut_errors(&mut self) -> &mut ::std::vec::Vec { + &mut self.errors + } + #[inline] + pub fn take_errors(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.errors, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for PrewriteResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PrewriteResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PrewriteResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PrewriteResponse = PrewriteResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PessimisticLockRequest { -pub fn new_() -> PessimisticLockRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_mutations(&mut self) { self.mutations.clear(); } -#[inline] pub fn set_mutations(&mut self, v: :: std :: vec :: Vec < Mutation >) { self.mutations = v; } -#[inline] pub fn get_mutations(&self) -> &:: std :: vec :: Vec < Mutation > { &self.mutations } -#[inline] pub fn mut_mutations(&mut self) -> &mut :: std :: vec :: Vec < Mutation > { &mut self.mutations } -#[inline] pub fn take_mutations(&mut self) -> :: std :: vec :: Vec < Mutation > { ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) } -#[inline] pub fn clear_primary_lock(&mut self) { self.primary_lock.clear(); } -#[inline] pub fn set_primary_lock(&mut self, v: std :: vec :: Vec < u8 >) { self.primary_lock = v; } -#[inline] pub fn get_primary_lock(&self) -> &[u8] { &self.primary_lock } -#[inline] pub fn mut_primary_lock(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.primary_lock } -#[inline] pub fn take_primary_lock(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.primary_lock, ::std::vec::Vec::new()) } -#[inline] pub fn clear_start_version(&mut self) { self.start_version = 0 } -#[inline] pub fn set_start_version(&mut self, v: u64) { self.start_version = v; } -#[inline] pub fn get_start_version(&self) -> u64 { self.start_version } -#[inline] pub fn clear_lock_ttl(&mut self) { self.lock_ttl = 0 } -#[inline] pub fn set_lock_ttl(&mut self, v: u64) { self.lock_ttl = v; } -#[inline] pub fn get_lock_ttl(&self) -> u64 { self.lock_ttl } -#[inline] pub fn clear_for_update_ts(&mut self) { self.for_update_ts = 0 } -#[inline] pub fn set_for_update_ts(&mut self, v: u64) { self.for_update_ts = v; } -#[inline] pub fn get_for_update_ts(&self) -> u64 { self.for_update_ts } -#[inline] pub fn clear_is_first_lock(&mut self) { self.is_first_lock = false } -#[inline] pub fn set_is_first_lock(&mut self, v: bool) { self.is_first_lock = v; } -#[inline] pub fn get_is_first_lock(&self) -> bool { self.is_first_lock } -} -impl ::protobuf::Clear for PessimisticLockRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PessimisticLockRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PessimisticLockRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PessimisticLockRequest = PessimisticLockRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PessimisticLockRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_mutations(&mut self) { + self.mutations.clear(); + } + #[inline] + pub fn set_mutations(&mut self, v: ::std::vec::Vec) { + self.mutations = v; + } + #[inline] + pub fn get_mutations(&self) -> &::std::vec::Vec { + &self.mutations + } + #[inline] + pub fn mut_mutations(&mut self) -> &mut ::std::vec::Vec { + &mut self.mutations + } + #[inline] + pub fn take_mutations(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_primary_lock(&mut self) { + self.primary_lock.clear(); + } + #[inline] + pub fn set_primary_lock(&mut self, v: std::vec::Vec) { + self.primary_lock = v; + } + #[inline] + pub fn get_primary_lock(&self) -> &[u8] { + &self.primary_lock + } + #[inline] + pub fn mut_primary_lock(&mut self) -> &mut std::vec::Vec { + &mut self.primary_lock + } + #[inline] + pub fn take_primary_lock(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.primary_lock, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_start_version(&mut self) { + self.start_version = 0 + } + #[inline] + pub fn set_start_version(&mut self, v: u64) { + self.start_version = v; + } + #[inline] + pub fn get_start_version(&self) -> u64 { + self.start_version + } + #[inline] + pub fn clear_lock_ttl(&mut self) { + self.lock_ttl = 0 + } + #[inline] + pub fn set_lock_ttl(&mut self, v: u64) { + self.lock_ttl = v; + } + #[inline] + pub fn get_lock_ttl(&self) -> u64 { + self.lock_ttl + } + #[inline] + pub fn clear_for_update_ts(&mut self) { + self.for_update_ts = 0 + } + #[inline] + pub fn set_for_update_ts(&mut self, v: u64) { + self.for_update_ts = v; + } + #[inline] + pub fn get_for_update_ts(&self) -> u64 { + self.for_update_ts + } + #[inline] + pub fn clear_is_first_lock(&mut self) { + self.is_first_lock = false + } + #[inline] + pub fn set_is_first_lock(&mut self, v: bool) { + self.is_first_lock = v; + } + #[inline] + pub fn get_is_first_lock(&self) -> bool { + self.is_first_lock + } +} +impl ::protobuf::Clear for PessimisticLockRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PessimisticLockRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PessimisticLockRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PessimisticLockRequest = PessimisticLockRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PessimisticLockResponse { -pub fn new_() -> PessimisticLockResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_errors(&mut self) { self.errors.clear(); } -#[inline] pub fn set_errors(&mut self, v: :: std :: vec :: Vec < KeyError >) { self.errors = v; } -#[inline] pub fn get_errors(&self) -> &:: std :: vec :: Vec < KeyError > { &self.errors } -#[inline] pub fn mut_errors(&mut self) -> &mut :: std :: vec :: Vec < KeyError > { &mut self.errors } -#[inline] pub fn take_errors(&mut self) -> :: std :: vec :: Vec < KeyError > { ::std::mem::replace(&mut self.errors, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for PessimisticLockResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PessimisticLockResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PessimisticLockResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PessimisticLockResponse = PessimisticLockResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PessimisticLockResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_errors(&mut self) { + self.errors.clear(); + } + #[inline] + pub fn set_errors(&mut self, v: ::std::vec::Vec) { + self.errors = v; + } + #[inline] + pub fn get_errors(&self) -> &::std::vec::Vec { + &self.errors + } + #[inline] + pub fn mut_errors(&mut self) -> &mut ::std::vec::Vec { + &mut self.errors + } + #[inline] + pub fn take_errors(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.errors, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for PessimisticLockResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PessimisticLockResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PessimisticLockResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PessimisticLockResponse = PessimisticLockResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PessimisticRollbackRequest { -pub fn new_() -> PessimisticRollbackRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_version(&mut self) { self.start_version = 0 } -#[inline] pub fn set_start_version(&mut self, v: u64) { self.start_version = v; } -#[inline] pub fn get_start_version(&self) -> u64 { self.start_version } -#[inline] pub fn clear_for_update_ts(&mut self) { self.for_update_ts = 0 } -#[inline] pub fn set_for_update_ts(&mut self, v: u64) { self.for_update_ts = v; } -#[inline] pub fn get_for_update_ts(&self) -> u64 { self.for_update_ts } -#[inline] pub fn clear_keys(&mut self) { self.keys.clear(); } -#[inline] pub fn set_keys(&mut self, v: :: std :: vec :: Vec < std :: vec :: Vec < u8 > >) { self.keys = v; } -#[inline] pub fn get_keys(&self) -> &:: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &self.keys } -#[inline] pub fn mut_keys(&mut self) -> &mut :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &mut self.keys } -#[inline] pub fn take_keys(&mut self) -> :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for PessimisticRollbackRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PessimisticRollbackRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PessimisticRollbackRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PessimisticRollbackRequest = PessimisticRollbackRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PessimisticRollbackRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_version(&mut self) { + self.start_version = 0 + } + #[inline] + pub fn set_start_version(&mut self, v: u64) { + self.start_version = v; + } + #[inline] + pub fn get_start_version(&self) -> u64 { + self.start_version + } + #[inline] + pub fn clear_for_update_ts(&mut self) { + self.for_update_ts = 0 + } + #[inline] + pub fn set_for_update_ts(&mut self, v: u64) { + self.for_update_ts = v; + } + #[inline] + pub fn get_for_update_ts(&self) -> u64 { + self.for_update_ts + } + #[inline] + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + #[inline] + pub fn set_keys(&mut self, v: ::std::vec::Vec>) { + self.keys = v; + } + #[inline] + pub fn get_keys(&self) -> &::std::vec::Vec> { + &self.keys + } + #[inline] + pub fn mut_keys(&mut self) -> &mut ::std::vec::Vec> { + &mut self.keys + } + #[inline] + pub fn take_keys(&mut self) -> ::std::vec::Vec> { + ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for PessimisticRollbackRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PessimisticRollbackRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PessimisticRollbackRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PessimisticRollbackRequest = PessimisticRollbackRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PessimisticRollbackResponse { -pub fn new_() -> PessimisticRollbackResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_errors(&mut self) { self.errors.clear(); } -#[inline] pub fn set_errors(&mut self, v: :: std :: vec :: Vec < KeyError >) { self.errors = v; } -#[inline] pub fn get_errors(&self) -> &:: std :: vec :: Vec < KeyError > { &self.errors } -#[inline] pub fn mut_errors(&mut self) -> &mut :: std :: vec :: Vec < KeyError > { &mut self.errors } -#[inline] pub fn take_errors(&mut self) -> :: std :: vec :: Vec < KeyError > { ::std::mem::replace(&mut self.errors, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for PessimisticRollbackResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PessimisticRollbackResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PessimisticRollbackResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PessimisticRollbackResponse = PessimisticRollbackResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PessimisticRollbackResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_errors(&mut self) { + self.errors.clear(); + } + #[inline] + pub fn set_errors(&mut self, v: ::std::vec::Vec) { + self.errors = v; + } + #[inline] + pub fn get_errors(&self) -> &::std::vec::Vec { + &self.errors + } + #[inline] + pub fn mut_errors(&mut self) -> &mut ::std::vec::Vec { + &mut self.errors + } + #[inline] + pub fn take_errors(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.errors, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for PessimisticRollbackResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PessimisticRollbackResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PessimisticRollbackResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PessimisticRollbackResponse = PessimisticRollbackResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CommitRequest { -pub fn new_() -> CommitRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_version(&mut self) { self.start_version = 0 } -#[inline] pub fn set_start_version(&mut self, v: u64) { self.start_version = v; } -#[inline] pub fn get_start_version(&self) -> u64 { self.start_version } -#[inline] pub fn clear_keys(&mut self) { self.keys.clear(); } -#[inline] pub fn set_keys(&mut self, v: :: std :: vec :: Vec < std :: vec :: Vec < u8 > >) { self.keys = v; } -#[inline] pub fn get_keys(&self) -> &:: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &self.keys } -#[inline] pub fn mut_keys(&mut self) -> &mut :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &mut self.keys } -#[inline] pub fn take_keys(&mut self) -> :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) } -#[inline] pub fn clear_commit_version(&mut self) { self.commit_version = 0 } -#[inline] pub fn set_commit_version(&mut self, v: u64) { self.commit_version = v; } -#[inline] pub fn get_commit_version(&self) -> u64 { self.commit_version } -} -impl ::protobuf::Clear for CommitRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CommitRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommitRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommitRequest = CommitRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CommitRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_version(&mut self) { + self.start_version = 0 + } + #[inline] + pub fn set_start_version(&mut self, v: u64) { + self.start_version = v; + } + #[inline] + pub fn get_start_version(&self) -> u64 { + self.start_version + } + #[inline] + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + #[inline] + pub fn set_keys(&mut self, v: ::std::vec::Vec>) { + self.keys = v; + } + #[inline] + pub fn get_keys(&self) -> &::std::vec::Vec> { + &self.keys + } + #[inline] + pub fn mut_keys(&mut self) -> &mut ::std::vec::Vec> { + &mut self.keys + } + #[inline] + pub fn take_keys(&mut self) -> ::std::vec::Vec> { + ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_commit_version(&mut self) { + self.commit_version = 0 + } + #[inline] + pub fn set_commit_version(&mut self, v: u64) { + self.commit_version = v; + } + #[inline] + pub fn get_commit_version(&self) -> u64 { + self.commit_version + } +} +impl ::protobuf::Clear for CommitRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CommitRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommitRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommitRequest = CommitRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CommitResponse { -pub fn new_() -> CommitResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -} -impl ::protobuf::Clear for CommitResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CommitResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommitResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommitResponse = CommitResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CommitResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } +} +impl ::protobuf::Clear for CommitResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CommitResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommitResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommitResponse = CommitResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ImportRequest { -pub fn new_() -> ImportRequest { ::std::default::Default::default() } -#[inline] pub fn clear_mutations(&mut self) { self.mutations.clear(); } -#[inline] pub fn set_mutations(&mut self, v: :: std :: vec :: Vec < Mutation >) { self.mutations = v; } -#[inline] pub fn get_mutations(&self) -> &:: std :: vec :: Vec < Mutation > { &self.mutations } -#[inline] pub fn mut_mutations(&mut self) -> &mut :: std :: vec :: Vec < Mutation > { &mut self.mutations } -#[inline] pub fn take_mutations(&mut self) -> :: std :: vec :: Vec < Mutation > { ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) } -#[inline] pub fn clear_commit_version(&mut self) { self.commit_version = 0 } -#[inline] pub fn set_commit_version(&mut self, v: u64) { self.commit_version = v; } -#[inline] pub fn get_commit_version(&self) -> u64 { self.commit_version } -} -impl ::protobuf::Clear for ImportRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ImportRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ImportRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ImportRequest = ImportRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ImportRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_mutations(&mut self) { + self.mutations.clear(); + } + #[inline] + pub fn set_mutations(&mut self, v: ::std::vec::Vec) { + self.mutations = v; + } + #[inline] + pub fn get_mutations(&self) -> &::std::vec::Vec { + &self.mutations + } + #[inline] + pub fn mut_mutations(&mut self) -> &mut ::std::vec::Vec { + &mut self.mutations + } + #[inline] + pub fn take_mutations(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.mutations, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_commit_version(&mut self) { + self.commit_version = 0 + } + #[inline] + pub fn set_commit_version(&mut self, v: u64) { + self.commit_version = v; + } + #[inline] + pub fn get_commit_version(&self) -> u64 { + self.commit_version + } +} +impl ::protobuf::Clear for ImportRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ImportRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ImportRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ImportRequest = ImportRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ImportResponse { -pub fn new_() -> ImportResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for ImportResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ImportResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ImportResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ImportResponse = ImportResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ImportResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for ImportResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ImportResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ImportResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ImportResponse = ImportResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BatchRollbackRequest { -pub fn new_() -> BatchRollbackRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_version(&mut self) { self.start_version = 0 } -#[inline] pub fn set_start_version(&mut self, v: u64) { self.start_version = v; } -#[inline] pub fn get_start_version(&self) -> u64 { self.start_version } -#[inline] pub fn clear_keys(&mut self) { self.keys.clear(); } -#[inline] pub fn set_keys(&mut self, v: :: std :: vec :: Vec < std :: vec :: Vec < u8 > >) { self.keys = v; } -#[inline] pub fn get_keys(&self) -> &:: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &self.keys } -#[inline] pub fn mut_keys(&mut self) -> &mut :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &mut self.keys } -#[inline] pub fn take_keys(&mut self) -> :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for BatchRollbackRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BatchRollbackRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchRollbackRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchRollbackRequest = BatchRollbackRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BatchRollbackRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_version(&mut self) { + self.start_version = 0 + } + #[inline] + pub fn set_start_version(&mut self, v: u64) { + self.start_version = v; + } + #[inline] + pub fn get_start_version(&self) -> u64 { + self.start_version + } + #[inline] + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + #[inline] + pub fn set_keys(&mut self, v: ::std::vec::Vec>) { + self.keys = v; + } + #[inline] + pub fn get_keys(&self) -> &::std::vec::Vec> { + &self.keys + } + #[inline] + pub fn mut_keys(&mut self) -> &mut ::std::vec::Vec> { + &mut self.keys + } + #[inline] + pub fn take_keys(&mut self) -> ::std::vec::Vec> { + ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for BatchRollbackRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BatchRollbackRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchRollbackRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchRollbackRequest = BatchRollbackRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BatchRollbackResponse { -pub fn new_() -> BatchRollbackResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -} -impl ::protobuf::Clear for BatchRollbackResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BatchRollbackResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchRollbackResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchRollbackResponse = BatchRollbackResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BatchRollbackResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } +} +impl ::protobuf::Clear for BatchRollbackResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BatchRollbackResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchRollbackResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchRollbackResponse = BatchRollbackResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CleanupRequest { -pub fn new_() -> CleanupRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_start_version(&mut self) { self.start_version = 0 } -#[inline] pub fn set_start_version(&mut self, v: u64) { self.start_version = v; } -#[inline] pub fn get_start_version(&self) -> u64 { self.start_version } -} -impl ::protobuf::Clear for CleanupRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CleanupRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CleanupRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CleanupRequest = CleanupRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CleanupRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_start_version(&mut self) { + self.start_version = 0 + } + #[inline] + pub fn set_start_version(&mut self, v: u64) { + self.start_version = v; + } + #[inline] + pub fn get_start_version(&self) -> u64 { + self.start_version + } +} +impl ::protobuf::Clear for CleanupRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CleanupRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CleanupRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CleanupRequest = CleanupRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CleanupResponse { -pub fn new_() -> CleanupResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -#[inline] pub fn clear_commit_version(&mut self) { self.commit_version = 0 } -#[inline] pub fn set_commit_version(&mut self, v: u64) { self.commit_version = v; } -#[inline] pub fn get_commit_version(&self) -> u64 { self.commit_version } -} -impl ::protobuf::Clear for CleanupResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CleanupResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CleanupResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CleanupResponse = CleanupResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CleanupResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } + #[inline] + pub fn clear_commit_version(&mut self) { + self.commit_version = 0 + } + #[inline] + pub fn set_commit_version(&mut self, v: u64) { + self.commit_version = v; + } + #[inline] + pub fn get_commit_version(&self) -> u64 { + self.commit_version + } +} +impl ::protobuf::Clear for CleanupResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CleanupResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CleanupResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CleanupResponse = CleanupResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BatchGetRequest { -pub fn new_() -> BatchGetRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_keys(&mut self) { self.keys.clear(); } -#[inline] pub fn set_keys(&mut self, v: :: std :: vec :: Vec < std :: vec :: Vec < u8 > >) { self.keys = v; } -#[inline] pub fn get_keys(&self) -> &:: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &self.keys } -#[inline] pub fn mut_keys(&mut self) -> &mut :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &mut self.keys } -#[inline] pub fn take_keys(&mut self) -> :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) } -#[inline] pub fn clear_version(&mut self) { self.version = 0 } -#[inline] pub fn set_version(&mut self, v: u64) { self.version = v; } -#[inline] pub fn get_version(&self) -> u64 { self.version } -} -impl ::protobuf::Clear for BatchGetRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BatchGetRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchGetRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchGetRequest = BatchGetRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BatchGetRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + #[inline] + pub fn set_keys(&mut self, v: ::std::vec::Vec>) { + self.keys = v; + } + #[inline] + pub fn get_keys(&self) -> &::std::vec::Vec> { + &self.keys + } + #[inline] + pub fn mut_keys(&mut self) -> &mut ::std::vec::Vec> { + &mut self.keys + } + #[inline] + pub fn take_keys(&mut self) -> ::std::vec::Vec> { + ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_version(&mut self) { + self.version = 0 + } + #[inline] + pub fn set_version(&mut self, v: u64) { + self.version = v; + } + #[inline] + pub fn get_version(&self) -> u64 { + self.version + } +} +impl ::protobuf::Clear for BatchGetRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BatchGetRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchGetRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchGetRequest = BatchGetRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BatchGetResponse { -pub fn new_() -> BatchGetResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_pairs(&mut self) { self.pairs.clear(); } -#[inline] pub fn set_pairs(&mut self, v: :: std :: vec :: Vec < KvPair >) { self.pairs = v; } -#[inline] pub fn get_pairs(&self) -> &:: std :: vec :: Vec < KvPair > { &self.pairs } -#[inline] pub fn mut_pairs(&mut self) -> &mut :: std :: vec :: Vec < KvPair > { &mut self.pairs } -#[inline] pub fn take_pairs(&mut self) -> :: std :: vec :: Vec < KvPair > { ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for BatchGetResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BatchGetResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchGetResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchGetResponse = BatchGetResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BatchGetResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_pairs(&mut self) { + self.pairs.clear(); + } + #[inline] + pub fn set_pairs(&mut self, v: ::std::vec::Vec) { + self.pairs = v; + } + #[inline] + pub fn get_pairs(&self) -> &::std::vec::Vec { + &self.pairs + } + #[inline] + pub fn mut_pairs(&mut self) -> &mut ::std::vec::Vec { + &mut self.pairs + } + #[inline] + pub fn take_pairs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for BatchGetResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BatchGetResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchGetResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchGetResponse = BatchGetResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanLockRequest { -pub fn new_() -> ScanLockRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_max_version(&mut self) { self.max_version = 0 } -#[inline] pub fn set_max_version(&mut self, v: u64) { self.max_version = v; } -#[inline] pub fn get_max_version(&self) -> u64 { self.max_version } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_limit(&mut self) { self.limit = 0 } -#[inline] pub fn set_limit(&mut self, v: u32) { self.limit = v; } -#[inline] pub fn get_limit(&self) -> u32 { self.limit } -} -impl ::protobuf::Clear for ScanLockRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanLockRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanLockRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanLockRequest = ScanLockRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanLockRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_max_version(&mut self) { + self.max_version = 0 + } + #[inline] + pub fn set_max_version(&mut self, v: u64) { + self.max_version = v; + } + #[inline] + pub fn get_max_version(&self) -> u64 { + self.max_version + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_limit(&mut self) { + self.limit = 0 + } + #[inline] + pub fn set_limit(&mut self, v: u32) { + self.limit = v; + } + #[inline] + pub fn get_limit(&self) -> u32 { + self.limit + } +} +impl ::protobuf::Clear for ScanLockRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanLockRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanLockRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanLockRequest = ScanLockRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanLockResponse { -pub fn new_() -> ScanLockResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -#[inline] pub fn clear_locks(&mut self) { self.locks.clear(); } -#[inline] pub fn set_locks(&mut self, v: :: std :: vec :: Vec < LockInfo >) { self.locks = v; } -#[inline] pub fn get_locks(&self) -> &:: std :: vec :: Vec < LockInfo > { &self.locks } -#[inline] pub fn mut_locks(&mut self) -> &mut :: std :: vec :: Vec < LockInfo > { &mut self.locks } -#[inline] pub fn take_locks(&mut self) -> :: std :: vec :: Vec < LockInfo > { ::std::mem::replace(&mut self.locks, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for ScanLockResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanLockResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanLockResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanLockResponse = ScanLockResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanLockResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } + #[inline] + pub fn clear_locks(&mut self) { + self.locks.clear(); + } + #[inline] + pub fn set_locks(&mut self, v: ::std::vec::Vec) { + self.locks = v; + } + #[inline] + pub fn get_locks(&self) -> &::std::vec::Vec { + &self.locks + } + #[inline] + pub fn mut_locks(&mut self) -> &mut ::std::vec::Vec { + &mut self.locks + } + #[inline] + pub fn take_locks(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.locks, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for ScanLockResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanLockResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanLockResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanLockResponse = ScanLockResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl TxnInfo { -pub fn new_() -> TxnInfo { ::std::default::Default::default() } -#[inline] pub fn clear_txn(&mut self) { self.txn = 0 } -#[inline] pub fn set_txn(&mut self, v: u64) { self.txn = v; } -#[inline] pub fn get_txn(&self) -> u64 { self.txn } -#[inline] pub fn clear_status(&mut self) { self.status = 0 } -#[inline] pub fn set_status(&mut self, v: u64) { self.status = v; } -#[inline] pub fn get_status(&self) -> u64 { self.status } -} -impl ::protobuf::Clear for TxnInfo {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for TxnInfo {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static TxnInfo { - ::lazy_static::lazy_static! { - static ref INSTANCE: TxnInfo = TxnInfo::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> TxnInfo { + ::std::default::Default::default() + } + #[inline] + pub fn clear_txn(&mut self) { + self.txn = 0 + } + #[inline] + pub fn set_txn(&mut self, v: u64) { + self.txn = v; + } + #[inline] + pub fn get_txn(&self) -> u64 { + self.txn + } + #[inline] + pub fn clear_status(&mut self) { + self.status = 0 + } + #[inline] + pub fn set_status(&mut self, v: u64) { + self.status = v; + } + #[inline] + pub fn get_status(&self) -> u64 { + self.status + } +} +impl ::protobuf::Clear for TxnInfo { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for TxnInfo { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static TxnInfo { + ::lazy_static::lazy_static! { + static ref INSTANCE: TxnInfo = TxnInfo::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ResolveLockRequest { -pub fn new_() -> ResolveLockRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_version(&mut self) { self.start_version = 0 } -#[inline] pub fn set_start_version(&mut self, v: u64) { self.start_version = v; } -#[inline] pub fn get_start_version(&self) -> u64 { self.start_version } -#[inline] pub fn clear_commit_version(&mut self) { self.commit_version = 0 } -#[inline] pub fn set_commit_version(&mut self, v: u64) { self.commit_version = v; } -#[inline] pub fn get_commit_version(&self) -> u64 { self.commit_version } -#[inline] pub fn clear_txn_infos(&mut self) { self.txn_infos.clear(); } -#[inline] pub fn set_txn_infos(&mut self, v: :: std :: vec :: Vec < TxnInfo >) { self.txn_infos = v; } -#[inline] pub fn get_txn_infos(&self) -> &:: std :: vec :: Vec < TxnInfo > { &self.txn_infos } -#[inline] pub fn mut_txn_infos(&mut self) -> &mut :: std :: vec :: Vec < TxnInfo > { &mut self.txn_infos } -#[inline] pub fn take_txn_infos(&mut self) -> :: std :: vec :: Vec < TxnInfo > { ::std::mem::replace(&mut self.txn_infos, ::std::vec::Vec::new()) } -#[inline] pub fn clear_keys(&mut self) { self.keys.clear(); } -#[inline] pub fn set_keys(&mut self, v: :: std :: vec :: Vec < std :: vec :: Vec < u8 > >) { self.keys = v; } -#[inline] pub fn get_keys(&self) -> &:: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &self.keys } -#[inline] pub fn mut_keys(&mut self) -> &mut :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &mut self.keys } -#[inline] pub fn take_keys(&mut self) -> :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for ResolveLockRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ResolveLockRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ResolveLockRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ResolveLockRequest = ResolveLockRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ResolveLockRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_version(&mut self) { + self.start_version = 0 + } + #[inline] + pub fn set_start_version(&mut self, v: u64) { + self.start_version = v; + } + #[inline] + pub fn get_start_version(&self) -> u64 { + self.start_version + } + #[inline] + pub fn clear_commit_version(&mut self) { + self.commit_version = 0 + } + #[inline] + pub fn set_commit_version(&mut self, v: u64) { + self.commit_version = v; + } + #[inline] + pub fn get_commit_version(&self) -> u64 { + self.commit_version + } + #[inline] + pub fn clear_txn_infos(&mut self) { + self.txn_infos.clear(); + } + #[inline] + pub fn set_txn_infos(&mut self, v: ::std::vec::Vec) { + self.txn_infos = v; + } + #[inline] + pub fn get_txn_infos(&self) -> &::std::vec::Vec { + &self.txn_infos + } + #[inline] + pub fn mut_txn_infos(&mut self) -> &mut ::std::vec::Vec { + &mut self.txn_infos + } + #[inline] + pub fn take_txn_infos(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.txn_infos, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + #[inline] + pub fn set_keys(&mut self, v: ::std::vec::Vec>) { + self.keys = v; + } + #[inline] + pub fn get_keys(&self) -> &::std::vec::Vec> { + &self.keys + } + #[inline] + pub fn mut_keys(&mut self) -> &mut ::std::vec::Vec> { + &mut self.keys + } + #[inline] + pub fn take_keys(&mut self) -> ::std::vec::Vec> { + ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for ResolveLockRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ResolveLockRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ResolveLockRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ResolveLockRequest = ResolveLockRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ResolveLockResponse { -pub fn new_() -> ResolveLockResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -} -impl ::protobuf::Clear for ResolveLockResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ResolveLockResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ResolveLockResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ResolveLockResponse = ResolveLockResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ResolveLockResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } +} +impl ::protobuf::Clear for ResolveLockResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ResolveLockResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ResolveLockResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ResolveLockResponse = ResolveLockResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GcRequest { -pub fn new_() -> GcRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_safe_point(&mut self) { self.safe_point = 0 } -#[inline] pub fn set_safe_point(&mut self, v: u64) { self.safe_point = v; } -#[inline] pub fn get_safe_point(&self) -> u64 { self.safe_point } -} -impl ::protobuf::Clear for GcRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GcRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GcRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GcRequest = GcRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GcRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_safe_point(&mut self) { + self.safe_point = 0 + } + #[inline] + pub fn set_safe_point(&mut self, v: u64) { + self.safe_point = v; + } + #[inline] + pub fn get_safe_point(&self) -> u64 { + self.safe_point + } +} +impl ::protobuf::Clear for GcRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GcRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GcRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GcRequest = GcRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GcResponse { -pub fn new_() -> GcResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: KeyError) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &KeyError { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut KeyError { if self.error.is_none() { - self.error = ::std::option::Option::Some(KeyError::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> KeyError { self.error.take().unwrap_or_else(KeyError::default) } -} -impl ::protobuf::Clear for GcResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GcResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GcResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GcResponse = GcResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GcResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: KeyError) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &KeyError { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut KeyError { + if self.error.is_none() { + self.error = ::std::option::Option::Some(KeyError::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> KeyError { + self.error.take().unwrap_or_else(KeyError::default) + } +} +impl ::protobuf::Clear for GcResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GcResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GcResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GcResponse = GcResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawGetRequest { -pub fn new_() -> RawGetRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawGetRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawGetRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawGetRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawGetRequest = RawGetRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawGetRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawGetRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawGetRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawGetRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawGetRequest = RawGetRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawGetResponse { -pub fn new_() -> RawGetResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for RawGetResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawGetResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawGetResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawGetResponse = RawGetResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawGetResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for RawGetResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawGetResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawGetResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawGetResponse = RawGetResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawPutRequest { -pub fn new_() -> RawPutRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawPutRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawPutRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawPutRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawPutRequest = RawPutRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawPutRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawPutRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawPutRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawPutRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawPutRequest = RawPutRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawPutResponse { -pub fn new_() -> RawPutResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawPutResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawPutResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawPutResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawPutResponse = RawPutResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawPutResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawPutResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawPutResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawPutResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawPutResponse = RawPutResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchPutRequest { -pub fn new_() -> RawBatchPutRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_pairs(&mut self) { self.pairs.clear(); } -#[inline] pub fn set_pairs(&mut self, v: :: std :: vec :: Vec < KvPair >) { self.pairs = v; } -#[inline] pub fn get_pairs(&self) -> &:: std :: vec :: Vec < KvPair > { &self.pairs } -#[inline] pub fn mut_pairs(&mut self) -> &mut :: std :: vec :: Vec < KvPair > { &mut self.pairs } -#[inline] pub fn take_pairs(&mut self) -> :: std :: vec :: Vec < KvPair > { ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawBatchPutRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchPutRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchPutRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchPutRequest = RawBatchPutRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchPutRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_pairs(&mut self) { + self.pairs.clear(); + } + #[inline] + pub fn set_pairs(&mut self, v: ::std::vec::Vec) { + self.pairs = v; + } + #[inline] + pub fn get_pairs(&self) -> &::std::vec::Vec { + &self.pairs + } + #[inline] + pub fn mut_pairs(&mut self) -> &mut ::std::vec::Vec { + &mut self.pairs + } + #[inline] + pub fn take_pairs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawBatchPutRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchPutRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchPutRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchPutRequest = RawBatchPutRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchPutResponse { -pub fn new_() -> RawBatchPutResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawBatchPutResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchPutResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchPutResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchPutResponse = RawBatchPutResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchPutResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawBatchPutResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchPutResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchPutResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchPutResponse = RawBatchPutResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchGetRequest { -pub fn new_() -> RawBatchGetRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_keys(&mut self) { self.keys.clear(); } -#[inline] pub fn set_keys(&mut self, v: :: std :: vec :: Vec < std :: vec :: Vec < u8 > >) { self.keys = v; } -#[inline] pub fn get_keys(&self) -> &:: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &self.keys } -#[inline] pub fn mut_keys(&mut self) -> &mut :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &mut self.keys } -#[inline] pub fn take_keys(&mut self) -> :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawBatchGetRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchGetRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchGetRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchGetRequest = RawBatchGetRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchGetRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + #[inline] + pub fn set_keys(&mut self, v: ::std::vec::Vec>) { + self.keys = v; + } + #[inline] + pub fn get_keys(&self) -> &::std::vec::Vec> { + &self.keys + } + #[inline] + pub fn mut_keys(&mut self) -> &mut ::std::vec::Vec> { + &mut self.keys + } + #[inline] + pub fn take_keys(&mut self) -> ::std::vec::Vec> { + ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawBatchGetRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchGetRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchGetRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchGetRequest = RawBatchGetRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchGetResponse { -pub fn new_() -> RawBatchGetResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_pairs(&mut self) { self.pairs.clear(); } -#[inline] pub fn set_pairs(&mut self, v: :: std :: vec :: Vec < KvPair >) { self.pairs = v; } -#[inline] pub fn get_pairs(&self) -> &:: std :: vec :: Vec < KvPair > { &self.pairs } -#[inline] pub fn mut_pairs(&mut self) -> &mut :: std :: vec :: Vec < KvPair > { &mut self.pairs } -#[inline] pub fn take_pairs(&mut self) -> :: std :: vec :: Vec < KvPair > { ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for RawBatchGetResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchGetResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchGetResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchGetResponse = RawBatchGetResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchGetResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_pairs(&mut self) { + self.pairs.clear(); + } + #[inline] + pub fn set_pairs(&mut self, v: ::std::vec::Vec) { + self.pairs = v; + } + #[inline] + pub fn get_pairs(&self) -> &::std::vec::Vec { + &self.pairs + } + #[inline] + pub fn mut_pairs(&mut self) -> &mut ::std::vec::Vec { + &mut self.pairs + } + #[inline] + pub fn take_pairs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.pairs, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for RawBatchGetResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchGetResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchGetResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchGetResponse = RawBatchGetResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawDeleteRequest { -pub fn new_() -> RawDeleteRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawDeleteRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawDeleteRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawDeleteRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawDeleteRequest = RawDeleteRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawDeleteRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawDeleteRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawDeleteRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawDeleteRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawDeleteRequest = RawDeleteRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawDeleteResponse { -pub fn new_() -> RawDeleteResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawDeleteResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawDeleteResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawDeleteResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawDeleteResponse = RawDeleteResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawDeleteResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawDeleteResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawDeleteResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawDeleteResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawDeleteResponse = RawDeleteResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchDeleteRequest { -pub fn new_() -> RawBatchDeleteRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_keys(&mut self) { self.keys.clear(); } -#[inline] pub fn set_keys(&mut self, v: :: std :: vec :: Vec < std :: vec :: Vec < u8 > >) { self.keys = v; } -#[inline] pub fn get_keys(&self) -> &:: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &self.keys } -#[inline] pub fn mut_keys(&mut self) -> &mut :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { &mut self.keys } -#[inline] pub fn take_keys(&mut self) -> :: std :: vec :: Vec < std :: vec :: Vec < u8 > > { ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawBatchDeleteRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchDeleteRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchDeleteRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchDeleteRequest = RawBatchDeleteRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchDeleteRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + #[inline] + pub fn set_keys(&mut self, v: ::std::vec::Vec>) { + self.keys = v; + } + #[inline] + pub fn get_keys(&self) -> &::std::vec::Vec> { + &self.keys + } + #[inline] + pub fn mut_keys(&mut self) -> &mut ::std::vec::Vec> { + &mut self.keys + } + #[inline] + pub fn take_keys(&mut self) -> ::std::vec::Vec> { + ::std::mem::replace(&mut self.keys, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawBatchDeleteRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchDeleteRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchDeleteRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchDeleteRequest = RawBatchDeleteRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchDeleteResponse { -pub fn new_() -> RawBatchDeleteResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawBatchDeleteResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchDeleteResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchDeleteResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchDeleteResponse = RawBatchDeleteResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchDeleteResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawBatchDeleteResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchDeleteResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchDeleteResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchDeleteResponse = RawBatchDeleteResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeleteRangeRequest { -pub fn new_() -> DeleteRangeRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_notify_only(&mut self) { self.notify_only = false } -#[inline] pub fn set_notify_only(&mut self, v: bool) { self.notify_only = v; } -#[inline] pub fn get_notify_only(&self) -> bool { self.notify_only } -} -impl ::protobuf::Clear for DeleteRangeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeleteRangeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeleteRangeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeleteRangeRequest = DeleteRangeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> DeleteRangeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_notify_only(&mut self) { + self.notify_only = false + } + #[inline] + pub fn set_notify_only(&mut self, v: bool) { + self.notify_only = v; + } + #[inline] + pub fn get_notify_only(&self) -> bool { + self.notify_only + } +} +impl ::protobuf::Clear for DeleteRangeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeleteRangeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeleteRangeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeleteRangeRequest = DeleteRangeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeleteRangeResponse { -pub fn new_() -> DeleteRangeResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for DeleteRangeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeleteRangeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeleteRangeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeleteRangeResponse = DeleteRangeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> DeleteRangeResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for DeleteRangeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeleteRangeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeleteRangeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeleteRangeResponse = DeleteRangeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawDeleteRangeRequest { -pub fn new_() -> RawDeleteRangeRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawDeleteRangeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawDeleteRangeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawDeleteRangeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawDeleteRangeRequest = RawDeleteRangeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawDeleteRangeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawDeleteRangeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawDeleteRangeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawDeleteRangeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawDeleteRangeRequest = RawDeleteRangeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawDeleteRangeResponse { -pub fn new_() -> RawDeleteRangeResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for RawDeleteRangeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawDeleteRangeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawDeleteRangeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawDeleteRangeResponse = RawDeleteRangeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawDeleteRangeResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for RawDeleteRangeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawDeleteRangeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawDeleteRangeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawDeleteRangeResponse = RawDeleteRangeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawScanRequest { -pub fn new_() -> RawScanRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_limit(&mut self) { self.limit = 0 } -#[inline] pub fn set_limit(&mut self, v: u32) { self.limit = v; } -#[inline] pub fn get_limit(&self) -> u32 { self.limit } -#[inline] pub fn clear_key_only(&mut self) { self.key_only = false } -#[inline] pub fn set_key_only(&mut self, v: bool) { self.key_only = v; } -#[inline] pub fn get_key_only(&self) -> bool { self.key_only } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_reverse(&mut self) { self.reverse = false } -#[inline] pub fn set_reverse(&mut self, v: bool) { self.reverse = v; } -#[inline] pub fn get_reverse(&self) -> bool { self.reverse } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for RawScanRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawScanRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawScanRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawScanRequest = RawScanRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawScanRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_limit(&mut self) { + self.limit = 0 + } + #[inline] + pub fn set_limit(&mut self, v: u32) { + self.limit = v; + } + #[inline] + pub fn get_limit(&self) -> u32 { + self.limit + } + #[inline] + pub fn clear_key_only(&mut self) { + self.key_only = false + } + #[inline] + pub fn set_key_only(&mut self, v: bool) { + self.key_only = v; + } + #[inline] + pub fn get_key_only(&self) -> bool { + self.key_only + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_reverse(&mut self) { + self.reverse = false + } + #[inline] + pub fn set_reverse(&mut self, v: bool) { + self.reverse = v; + } + #[inline] + pub fn get_reverse(&self) -> bool { + self.reverse + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for RawScanRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawScanRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawScanRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawScanRequest = RawScanRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawScanResponse { -pub fn new_() -> RawScanResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_kvs(&mut self) { self.kvs.clear(); } -#[inline] pub fn set_kvs(&mut self, v: :: std :: vec :: Vec < KvPair >) { self.kvs = v; } -#[inline] pub fn get_kvs(&self) -> &:: std :: vec :: Vec < KvPair > { &self.kvs } -#[inline] pub fn mut_kvs(&mut self) -> &mut :: std :: vec :: Vec < KvPair > { &mut self.kvs } -#[inline] pub fn take_kvs(&mut self) -> :: std :: vec :: Vec < KvPair > { ::std::mem::replace(&mut self.kvs, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for RawScanResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawScanResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawScanResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawScanResponse = RawScanResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawScanResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_kvs(&mut self) { + self.kvs.clear(); + } + #[inline] + pub fn set_kvs(&mut self, v: ::std::vec::Vec) { + self.kvs = v; + } + #[inline] + pub fn get_kvs(&self) -> &::std::vec::Vec { + &self.kvs + } + #[inline] + pub fn mut_kvs(&mut self) -> &mut ::std::vec::Vec { + &mut self.kvs + } + #[inline] + pub fn take_kvs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.kvs, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for RawScanResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawScanResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawScanResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawScanResponse = RawScanResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl KeyRange { -pub fn new_() -> KeyRange { ::std::default::Default::default() } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for KeyRange {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for KeyRange {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static KeyRange { - ::lazy_static::lazy_static! { - static ref INSTANCE: KeyRange = KeyRange::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> KeyRange { + ::std::default::Default::default() + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for KeyRange { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for KeyRange { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static KeyRange { + ::lazy_static::lazy_static! { + static ref INSTANCE: KeyRange = KeyRange::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchScanRequest { -pub fn new_() -> RawBatchScanRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_ranges(&mut self) { self.ranges.clear(); } -#[inline] pub fn set_ranges(&mut self, v: :: std :: vec :: Vec < KeyRange >) { self.ranges = v; } -#[inline] pub fn get_ranges(&self) -> &:: std :: vec :: Vec < KeyRange > { &self.ranges } -#[inline] pub fn mut_ranges(&mut self) -> &mut :: std :: vec :: Vec < KeyRange > { &mut self.ranges } -#[inline] pub fn take_ranges(&mut self) -> :: std :: vec :: Vec < KeyRange > { ::std::mem::replace(&mut self.ranges, ::std::vec::Vec::new()) } -#[inline] pub fn clear_each_limit(&mut self) { self.each_limit = 0 } -#[inline] pub fn set_each_limit(&mut self, v: u32) { self.each_limit = v; } -#[inline] pub fn get_each_limit(&self) -> u32 { self.each_limit } -#[inline] pub fn clear_key_only(&mut self) { self.key_only = false } -#[inline] pub fn set_key_only(&mut self, v: bool) { self.key_only = v; } -#[inline] pub fn get_key_only(&self) -> bool { self.key_only } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_reverse(&mut self) { self.reverse = false } -#[inline] pub fn set_reverse(&mut self, v: bool) { self.reverse = v; } -#[inline] pub fn get_reverse(&self) -> bool { self.reverse } -} -impl ::protobuf::Clear for RawBatchScanRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchScanRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchScanRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchScanRequest = RawBatchScanRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchScanRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_ranges(&mut self) { + self.ranges.clear(); + } + #[inline] + pub fn set_ranges(&mut self, v: ::std::vec::Vec) { + self.ranges = v; + } + #[inline] + pub fn get_ranges(&self) -> &::std::vec::Vec { + &self.ranges + } + #[inline] + pub fn mut_ranges(&mut self) -> &mut ::std::vec::Vec { + &mut self.ranges + } + #[inline] + pub fn take_ranges(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.ranges, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_each_limit(&mut self) { + self.each_limit = 0 + } + #[inline] + pub fn set_each_limit(&mut self, v: u32) { + self.each_limit = v; + } + #[inline] + pub fn get_each_limit(&self) -> u32 { + self.each_limit + } + #[inline] + pub fn clear_key_only(&mut self) { + self.key_only = false + } + #[inline] + pub fn set_key_only(&mut self, v: bool) { + self.key_only = v; + } + #[inline] + pub fn get_key_only(&self) -> bool { + self.key_only + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_reverse(&mut self) { + self.reverse = false + } + #[inline] + pub fn set_reverse(&mut self, v: bool) { + self.reverse = v; + } + #[inline] + pub fn get_reverse(&self) -> bool { + self.reverse + } +} +impl ::protobuf::Clear for RawBatchScanRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchScanRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchScanRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchScanRequest = RawBatchScanRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RawBatchScanResponse { -pub fn new_() -> RawBatchScanResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_kvs(&mut self) { self.kvs.clear(); } -#[inline] pub fn set_kvs(&mut self, v: :: std :: vec :: Vec < KvPair >) { self.kvs = v; } -#[inline] pub fn get_kvs(&self) -> &:: std :: vec :: Vec < KvPair > { &self.kvs } -#[inline] pub fn mut_kvs(&mut self) -> &mut :: std :: vec :: Vec < KvPair > { &mut self.kvs } -#[inline] pub fn take_kvs(&mut self) -> :: std :: vec :: Vec < KvPair > { ::std::mem::replace(&mut self.kvs, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for RawBatchScanResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RawBatchScanResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RawBatchScanResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RawBatchScanResponse = RawBatchScanResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RawBatchScanResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_kvs(&mut self) { + self.kvs.clear(); + } + #[inline] + pub fn set_kvs(&mut self, v: ::std::vec::Vec) { + self.kvs = v; + } + #[inline] + pub fn get_kvs(&self) -> &::std::vec::Vec { + &self.kvs + } + #[inline] + pub fn mut_kvs(&mut self) -> &mut ::std::vec::Vec { + &mut self.kvs + } + #[inline] + pub fn take_kvs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.kvs, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for RawBatchScanResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RawBatchScanResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RawBatchScanResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RawBatchScanResponse = RawBatchScanResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccWrite { -pub fn new_() -> MvccWrite { ::std::default::Default::default() } -#[inline] pub fn clear_field_type(&mut self) { self.r#type = 0 } -#[inline] pub fn set_field_type_(&mut self, v: Op) { self.r#type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_field_type(&self) -> Op { unsafe { ::std::mem::transmute::(self.r#type) } } -#[inline] pub fn clear_start_ts(&mut self) { self.start_ts = 0 } -#[inline] pub fn set_start_ts(&mut self, v: u64) { self.start_ts = v; } -#[inline] pub fn get_start_ts(&self) -> u64 { self.start_ts } -#[inline] pub fn clear_commit_ts(&mut self) { self.commit_ts = 0 } -#[inline] pub fn set_commit_ts(&mut self, v: u64) { self.commit_ts = v; } -#[inline] pub fn get_commit_ts(&self) -> u64 { self.commit_ts } -#[inline] pub fn clear_short_value(&mut self) { self.short_value.clear(); } -#[inline] pub fn set_short_value(&mut self, v: std :: vec :: Vec < u8 >) { self.short_value = v; } -#[inline] pub fn get_short_value(&self) -> &[u8] { &self.short_value } -#[inline] pub fn mut_short_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.short_value } -#[inline] pub fn take_short_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.short_value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for MvccWrite {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccWrite {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccWrite { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccWrite = MvccWrite::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccWrite { + ::std::default::Default::default() + } + #[inline] + pub fn clear_field_type(&mut self) { + self.r#type = 0 + } + #[inline] + pub fn set_field_type_(&mut self, v: Op) { + self.r#type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_field_type(&self) -> Op { + unsafe { ::std::mem::transmute::(self.r#type) } + } + #[inline] + pub fn clear_start_ts(&mut self) { + self.start_ts = 0 + } + #[inline] + pub fn set_start_ts(&mut self, v: u64) { + self.start_ts = v; + } + #[inline] + pub fn get_start_ts(&self) -> u64 { + self.start_ts + } + #[inline] + pub fn clear_commit_ts(&mut self) { + self.commit_ts = 0 + } + #[inline] + pub fn set_commit_ts(&mut self, v: u64) { + self.commit_ts = v; + } + #[inline] + pub fn get_commit_ts(&self) -> u64 { + self.commit_ts + } + #[inline] + pub fn clear_short_value(&mut self) { + self.short_value.clear(); + } + #[inline] + pub fn set_short_value(&mut self, v: std::vec::Vec) { + self.short_value = v; + } + #[inline] + pub fn get_short_value(&self) -> &[u8] { + &self.short_value + } + #[inline] + pub fn mut_short_value(&mut self) -> &mut std::vec::Vec { + &mut self.short_value + } + #[inline] + pub fn take_short_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.short_value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for MvccWrite { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccWrite { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccWrite { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccWrite = MvccWrite::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccValue { -pub fn new_() -> MvccValue { ::std::default::Default::default() } -#[inline] pub fn clear_start_ts(&mut self) { self.start_ts = 0 } -#[inline] pub fn set_start_ts(&mut self, v: u64) { self.start_ts = v; } -#[inline] pub fn get_start_ts(&self) -> u64 { self.start_ts } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for MvccValue {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccValue {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccValue { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccValue = MvccValue::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccValue { + ::std::default::Default::default() + } + #[inline] + pub fn clear_start_ts(&mut self) { + self.start_ts = 0 + } + #[inline] + pub fn set_start_ts(&mut self, v: u64) { + self.start_ts = v; + } + #[inline] + pub fn get_start_ts(&self) -> u64 { + self.start_ts + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for MvccValue { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccValue { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccValue { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccValue = MvccValue::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccLock { -pub fn new_() -> MvccLock { ::std::default::Default::default() } -#[inline] pub fn clear_field_type(&mut self) { self.r#type = 0 } -#[inline] pub fn set_field_type_(&mut self, v: Op) { self.r#type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_field_type(&self) -> Op { unsafe { ::std::mem::transmute::(self.r#type) } } -#[inline] pub fn clear_start_ts(&mut self) { self.start_ts = 0 } -#[inline] pub fn set_start_ts(&mut self, v: u64) { self.start_ts = v; } -#[inline] pub fn get_start_ts(&self) -> u64 { self.start_ts } -#[inline] pub fn clear_primary(&mut self) { self.primary.clear(); } -#[inline] pub fn set_primary(&mut self, v: std :: vec :: Vec < u8 >) { self.primary = v; } -#[inline] pub fn get_primary(&self) -> &[u8] { &self.primary } -#[inline] pub fn mut_primary(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.primary } -#[inline] pub fn take_primary(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.primary, ::std::vec::Vec::new()) } -#[inline] pub fn clear_short_value(&mut self) { self.short_value.clear(); } -#[inline] pub fn set_short_value(&mut self, v: std :: vec :: Vec < u8 >) { self.short_value = v; } -#[inline] pub fn get_short_value(&self) -> &[u8] { &self.short_value } -#[inline] pub fn mut_short_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.short_value } -#[inline] pub fn take_short_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.short_value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for MvccLock {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccLock {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccLock { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccLock = MvccLock::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccLock { + ::std::default::Default::default() + } + #[inline] + pub fn clear_field_type(&mut self) { + self.r#type = 0 + } + #[inline] + pub fn set_field_type_(&mut self, v: Op) { + self.r#type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_field_type(&self) -> Op { + unsafe { ::std::mem::transmute::(self.r#type) } + } + #[inline] + pub fn clear_start_ts(&mut self) { + self.start_ts = 0 + } + #[inline] + pub fn set_start_ts(&mut self, v: u64) { + self.start_ts = v; + } + #[inline] + pub fn get_start_ts(&self) -> u64 { + self.start_ts + } + #[inline] + pub fn clear_primary(&mut self) { + self.primary.clear(); + } + #[inline] + pub fn set_primary(&mut self, v: std::vec::Vec) { + self.primary = v; + } + #[inline] + pub fn get_primary(&self) -> &[u8] { + &self.primary + } + #[inline] + pub fn mut_primary(&mut self) -> &mut std::vec::Vec { + &mut self.primary + } + #[inline] + pub fn take_primary(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.primary, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_short_value(&mut self) { + self.short_value.clear(); + } + #[inline] + pub fn set_short_value(&mut self, v: std::vec::Vec) { + self.short_value = v; + } + #[inline] + pub fn get_short_value(&self) -> &[u8] { + &self.short_value + } + #[inline] + pub fn mut_short_value(&mut self) -> &mut std::vec::Vec { + &mut self.short_value + } + #[inline] + pub fn take_short_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.short_value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for MvccLock { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccLock { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccLock { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccLock = MvccLock::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccInfo { -pub fn new_() -> MvccInfo { ::std::default::Default::default() } -#[inline] pub fn has_lock(&self) -> bool { self.lock.is_some() } -#[inline] pub fn clear_lock(&mut self) { self.lock = ::std::option::Option::None } -#[inline] pub fn set_lock(&mut self, v: MvccLock) { self.lock = ::std::option::Option::Some(v); } -#[inline] pub fn get_lock(&self) -> &MvccLock { match self.lock.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_lock(&mut self) -> &mut MvccLock { if self.lock.is_none() { - self.lock = ::std::option::Option::Some(MvccLock::default()); - } - self.lock.as_mut().unwrap() } -#[inline] pub fn take_lock(&mut self) -> MvccLock { self.lock.take().unwrap_or_else(MvccLock::default) } -#[inline] pub fn clear_writes(&mut self) { self.writes.clear(); } -#[inline] pub fn set_writes(&mut self, v: :: std :: vec :: Vec < MvccWrite >) { self.writes = v; } -#[inline] pub fn get_writes(&self) -> &:: std :: vec :: Vec < MvccWrite > { &self.writes } -#[inline] pub fn mut_writes(&mut self) -> &mut :: std :: vec :: Vec < MvccWrite > { &mut self.writes } -#[inline] pub fn take_writes(&mut self) -> :: std :: vec :: Vec < MvccWrite > { ::std::mem::replace(&mut self.writes, ::std::vec::Vec::new()) } -#[inline] pub fn clear_values(&mut self) { self.values.clear(); } -#[inline] pub fn set_values(&mut self, v: :: std :: vec :: Vec < MvccValue >) { self.values = v; } -#[inline] pub fn get_values(&self) -> &:: std :: vec :: Vec < MvccValue > { &self.values } -#[inline] pub fn mut_values(&mut self) -> &mut :: std :: vec :: Vec < MvccValue > { &mut self.values } -#[inline] pub fn take_values(&mut self) -> :: std :: vec :: Vec < MvccValue > { ::std::mem::replace(&mut self.values, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for MvccInfo {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccInfo {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccInfo { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccInfo = MvccInfo::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccInfo { + ::std::default::Default::default() + } + #[inline] + pub fn has_lock(&self) -> bool { + self.lock.is_some() + } + #[inline] + pub fn clear_lock(&mut self) { + self.lock = ::std::option::Option::None + } + #[inline] + pub fn set_lock(&mut self, v: MvccLock) { + self.lock = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_lock(&self) -> &MvccLock { + match self.lock.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_lock(&mut self) -> &mut MvccLock { + if self.lock.is_none() { + self.lock = ::std::option::Option::Some(MvccLock::default()); + } + self.lock.as_mut().unwrap() + } + #[inline] + pub fn take_lock(&mut self) -> MvccLock { + self.lock.take().unwrap_or_else(MvccLock::default) + } + #[inline] + pub fn clear_writes(&mut self) { + self.writes.clear(); + } + #[inline] + pub fn set_writes(&mut self, v: ::std::vec::Vec) { + self.writes = v; + } + #[inline] + pub fn get_writes(&self) -> &::std::vec::Vec { + &self.writes + } + #[inline] + pub fn mut_writes(&mut self) -> &mut ::std::vec::Vec { + &mut self.writes + } + #[inline] + pub fn take_writes(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.writes, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_values(&mut self) { + self.values.clear(); + } + #[inline] + pub fn set_values(&mut self, v: ::std::vec::Vec) { + self.values = v; + } + #[inline] + pub fn get_values(&self) -> &::std::vec::Vec { + &self.values + } + #[inline] + pub fn mut_values(&mut self) -> &mut ::std::vec::Vec { + &mut self.values + } + #[inline] + pub fn take_values(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.values, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for MvccInfo { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccInfo { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccInfo { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccInfo = MvccInfo::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccGetByKeyRequest { -pub fn new_() -> MvccGetByKeyRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for MvccGetByKeyRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccGetByKeyRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccGetByKeyRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccGetByKeyRequest = MvccGetByKeyRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccGetByKeyRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for MvccGetByKeyRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccGetByKeyRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccGetByKeyRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccGetByKeyRequest = MvccGetByKeyRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccGetByKeyResponse { -pub fn new_() -> MvccGetByKeyResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -#[inline] pub fn has_info(&self) -> bool { self.info.is_some() } -#[inline] pub fn clear_info(&mut self) { self.info = ::std::option::Option::None } -#[inline] pub fn set_info(&mut self, v: MvccInfo) { self.info = ::std::option::Option::Some(v); } -#[inline] pub fn get_info(&self) -> &MvccInfo { match self.info.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_info(&mut self) -> &mut MvccInfo { if self.info.is_none() { - self.info = ::std::option::Option::Some(MvccInfo::default()); - } - self.info.as_mut().unwrap() } -#[inline] pub fn take_info(&mut self) -> MvccInfo { self.info.take().unwrap_or_else(MvccInfo::default) } -} -impl ::protobuf::Clear for MvccGetByKeyResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccGetByKeyResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccGetByKeyResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccGetByKeyResponse = MvccGetByKeyResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccGetByKeyResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } + #[inline] + pub fn has_info(&self) -> bool { + self.info.is_some() + } + #[inline] + pub fn clear_info(&mut self) { + self.info = ::std::option::Option::None + } + #[inline] + pub fn set_info(&mut self, v: MvccInfo) { + self.info = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_info(&self) -> &MvccInfo { + match self.info.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_info(&mut self) -> &mut MvccInfo { + if self.info.is_none() { + self.info = ::std::option::Option::Some(MvccInfo::default()); + } + self.info.as_mut().unwrap() + } + #[inline] + pub fn take_info(&mut self) -> MvccInfo { + self.info.take().unwrap_or_else(MvccInfo::default) + } +} +impl ::protobuf::Clear for MvccGetByKeyResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccGetByKeyResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccGetByKeyResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccGetByKeyResponse = MvccGetByKeyResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccGetByStartTsRequest { -pub fn new_() -> MvccGetByStartTsRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_ts(&mut self) { self.start_ts = 0 } -#[inline] pub fn set_start_ts(&mut self, v: u64) { self.start_ts = v; } -#[inline] pub fn get_start_ts(&self) -> u64 { self.start_ts } -} -impl ::protobuf::Clear for MvccGetByStartTsRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccGetByStartTsRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccGetByStartTsRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccGetByStartTsRequest = MvccGetByStartTsRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccGetByStartTsRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_ts(&mut self) { + self.start_ts = 0 + } + #[inline] + pub fn set_start_ts(&mut self, v: u64) { + self.start_ts = v; + } + #[inline] + pub fn get_start_ts(&self) -> u64 { + self.start_ts + } +} +impl ::protobuf::Clear for MvccGetByStartTsRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccGetByStartTsRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccGetByStartTsRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccGetByStartTsRequest = MvccGetByStartTsRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MvccGetByStartTsResponse { -pub fn new_() -> MvccGetByStartTsResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn has_info(&self) -> bool { self.info.is_some() } -#[inline] pub fn clear_info(&mut self) { self.info = ::std::option::Option::None } -#[inline] pub fn set_info(&mut self, v: MvccInfo) { self.info = ::std::option::Option::Some(v); } -#[inline] pub fn get_info(&self) -> &MvccInfo { match self.info.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_info(&mut self) -> &mut MvccInfo { if self.info.is_none() { - self.info = ::std::option::Option::Some(MvccInfo::default()); - } - self.info.as_mut().unwrap() } -#[inline] pub fn take_info(&mut self) -> MvccInfo { self.info.take().unwrap_or_else(MvccInfo::default) } -} -impl ::protobuf::Clear for MvccGetByStartTsResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MvccGetByStartTsResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MvccGetByStartTsResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: MvccGetByStartTsResponse = MvccGetByStartTsResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> MvccGetByStartTsResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_info(&self) -> bool { + self.info.is_some() + } + #[inline] + pub fn clear_info(&mut self) { + self.info = ::std::option::Option::None + } + #[inline] + pub fn set_info(&mut self, v: MvccInfo) { + self.info = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_info(&self) -> &MvccInfo { + match self.info.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_info(&mut self) -> &mut MvccInfo { + if self.info.is_none() { + self.info = ::std::option::Option::Some(MvccInfo::default()); + } + self.info.as_mut().unwrap() + } + #[inline] + pub fn take_info(&mut self) -> MvccInfo { + self.info.take().unwrap_or_else(MvccInfo::default) + } +} +impl ::protobuf::Clear for MvccGetByStartTsResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MvccGetByStartTsResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MvccGetByStartTsResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: MvccGetByStartTsResponse = MvccGetByStartTsResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SplitRegionRequest { -pub fn new_() -> SplitRegionRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_split_key(&mut self) { self.split_key.clear(); } -#[inline] pub fn set_split_key(&mut self, v: std :: vec :: Vec < u8 >) { self.split_key = v; } -#[inline] pub fn get_split_key(&self) -> &[u8] { &self.split_key } -#[inline] pub fn mut_split_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.split_key } -#[inline] pub fn take_split_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.split_key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for SplitRegionRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SplitRegionRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SplitRegionRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: SplitRegionRequest = SplitRegionRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SplitRegionRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_split_key(&mut self) { + self.split_key.clear(); + } + #[inline] + pub fn set_split_key(&mut self, v: std::vec::Vec) { + self.split_key = v; + } + #[inline] + pub fn get_split_key(&self) -> &[u8] { + &self.split_key + } + #[inline] + pub fn mut_split_key(&mut self) -> &mut std::vec::Vec { + &mut self.split_key + } + #[inline] + pub fn take_split_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.split_key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for SplitRegionRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SplitRegionRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SplitRegionRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: SplitRegionRequest = SplitRegionRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SplitRegionResponse { -pub fn new_() -> SplitRegionResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn has_left(&self) -> bool { self.left.is_some() } -#[inline] pub fn clear_left(&mut self) { self.left = ::std::option::Option::None } -#[inline] pub fn set_left(&mut self, v: super :: metapb :: Region) { self.left = ::std::option::Option::Some(v); } -#[inline] pub fn get_left(&self) -> &super :: metapb :: Region { match self.left.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_left(&mut self) -> &mut super :: metapb :: Region { if self.left.is_none() { - self.left = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.left.as_mut().unwrap() } -#[inline] pub fn take_left(&mut self) -> super :: metapb :: Region { self.left.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_right(&self) -> bool { self.right.is_some() } -#[inline] pub fn clear_right(&mut self) { self.right = ::std::option::Option::None } -#[inline] pub fn set_right(&mut self, v: super :: metapb :: Region) { self.right = ::std::option::Option::Some(v); } -#[inline] pub fn get_right(&self) -> &super :: metapb :: Region { match self.right.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_right(&mut self) -> &mut super :: metapb :: Region { if self.right.is_none() { - self.right = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.right.as_mut().unwrap() } -#[inline] pub fn take_right(&mut self) -> super :: metapb :: Region { self.right.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for SplitRegionResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SplitRegionResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SplitRegionResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: SplitRegionResponse = SplitRegionResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SplitRegionResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn has_left(&self) -> bool { + self.left.is_some() + } + #[inline] + pub fn clear_left(&mut self) { + self.left = ::std::option::Option::None + } + #[inline] + pub fn set_left(&mut self, v: super::metapb::Region) { + self.left = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_left(&self) -> &super::metapb::Region { + match self.left.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_left(&mut self) -> &mut super::metapb::Region { + if self.left.is_none() { + self.left = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.left.as_mut().unwrap() + } + #[inline] + pub fn take_left(&mut self) -> super::metapb::Region { + self.left + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_right(&self) -> bool { + self.right.is_some() + } + #[inline] + pub fn clear_right(&mut self) { + self.right = ::std::option::Option::None + } + #[inline] + pub fn set_right(&mut self, v: super::metapb::Region) { + self.right = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_right(&self) -> &super::metapb::Region { + match self.right.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_right(&mut self) -> &mut super::metapb::Region { + if self.right.is_none() { + self.right = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.right.as_mut().unwrap() + } + #[inline] + pub fn take_right(&mut self) -> super::metapb::Region { + self.right + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for SplitRegionResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SplitRegionResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SplitRegionResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: SplitRegionResponse = SplitRegionResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl UnsafeDestroyRangeRequest { -pub fn new_() -> UnsafeDestroyRangeRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for UnsafeDestroyRangeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for UnsafeDestroyRangeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static UnsafeDestroyRangeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: UnsafeDestroyRangeRequest = UnsafeDestroyRangeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> UnsafeDestroyRangeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for UnsafeDestroyRangeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for UnsafeDestroyRangeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static UnsafeDestroyRangeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: UnsafeDestroyRangeRequest = UnsafeDestroyRangeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl UnsafeDestroyRangeResponse { -pub fn new_() -> UnsafeDestroyRangeResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_error(&mut self) { self.error.clear(); } -#[inline] pub fn set_error(&mut self, v: std :: string :: String) { self.error = v; } -#[inline] pub fn get_error(&self) -> &str { &self.error } -#[inline] pub fn mut_error(&mut self) -> &mut std :: string :: String { &mut self.error } -#[inline] pub fn take_error(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.error, ::std::string::String::new()) } -} -impl ::protobuf::Clear for UnsafeDestroyRangeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for UnsafeDestroyRangeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static UnsafeDestroyRangeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: UnsafeDestroyRangeResponse = UnsafeDestroyRangeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> UnsafeDestroyRangeResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_error(&mut self) { + self.error.clear(); + } + #[inline] + pub fn set_error(&mut self, v: std::string::String) { + self.error = v; + } + #[inline] + pub fn get_error(&self) -> &str { + &self.error + } + #[inline] + pub fn mut_error(&mut self) -> &mut std::string::String { + &mut self.error + } + #[inline] + pub fn take_error(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.error, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for UnsafeDestroyRangeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for UnsafeDestroyRangeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static UnsafeDestroyRangeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: UnsafeDestroyRangeResponse = UnsafeDestroyRangeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReadIndexRequest { -pub fn new_() -> ReadIndexRequest { ::std::default::Default::default() } -#[inline] pub fn has_context(&self) -> bool { self.context.is_some() } -#[inline] pub fn clear_context(&mut self) { self.context = ::std::option::Option::None } -#[inline] pub fn set_context(&mut self, v: Context) { self.context = ::std::option::Option::Some(v); } -#[inline] pub fn get_context(&self) -> &Context { match self.context.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_context(&mut self) -> &mut Context { if self.context.is_none() { - self.context = ::std::option::Option::Some(Context::default()); - } - self.context.as_mut().unwrap() } -#[inline] pub fn take_context(&mut self) -> Context { self.context.take().unwrap_or_else(Context::default) } -} -impl ::protobuf::Clear for ReadIndexRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReadIndexRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReadIndexRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReadIndexRequest = ReadIndexRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReadIndexRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_context(&self) -> bool { + self.context.is_some() + } + #[inline] + pub fn clear_context(&mut self) { + self.context = ::std::option::Option::None + } + #[inline] + pub fn set_context(&mut self, v: Context) { + self.context = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_context(&self) -> &Context { + match self.context.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_context(&mut self) -> &mut Context { + if self.context.is_none() { + self.context = ::std::option::Option::Some(Context::default()); + } + self.context.as_mut().unwrap() + } + #[inline] + pub fn take_context(&mut self) -> Context { + self.context.take().unwrap_or_else(Context::default) + } +} +impl ::protobuf::Clear for ReadIndexRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReadIndexRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReadIndexRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReadIndexRequest = ReadIndexRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReadIndexResponse { -pub fn new_() -> ReadIndexResponse { ::std::default::Default::default() } -#[inline] pub fn has_region_error(&self) -> bool { self.region_error.is_some() } -#[inline] pub fn clear_region_error(&mut self) { self.region_error = ::std::option::Option::None } -#[inline] pub fn set_region_error(&mut self, v: super :: errorpb :: Error) { self.region_error = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_error(&self) -> &super :: errorpb :: Error { match self.region_error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_error(&mut self) -> &mut super :: errorpb :: Error { if self.region_error.is_none() { - self.region_error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.region_error.as_mut().unwrap() } -#[inline] pub fn take_region_error(&mut self) -> super :: errorpb :: Error { self.region_error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_read_index(&mut self) { self.read_index = 0 } -#[inline] pub fn set_read_index(&mut self, v: u64) { self.read_index = v; } -#[inline] pub fn get_read_index(&self) -> u64 { self.read_index } -} -impl ::protobuf::Clear for ReadIndexResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReadIndexResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReadIndexResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReadIndexResponse = ReadIndexResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReadIndexResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region_error(&self) -> bool { + self.region_error.is_some() + } + #[inline] + pub fn clear_region_error(&mut self) { + self.region_error = ::std::option::Option::None + } + #[inline] + pub fn set_region_error(&mut self, v: super::errorpb::Error) { + self.region_error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_error(&self) -> &super::errorpb::Error { + match self.region_error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_error(&mut self) -> &mut super::errorpb::Error { + if self.region_error.is_none() { + self.region_error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.region_error.as_mut().unwrap() + } + #[inline] + pub fn take_region_error(&mut self) -> super::errorpb::Error { + self.region_error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_read_index(&mut self) { + self.read_index = 0 + } + #[inline] + pub fn set_read_index(&mut self, v: u64) { + self.read_index = v; + } + #[inline] + pub fn get_read_index(&self) -> u64 { + self.read_index + } +} +impl ::protobuf::Clear for ReadIndexResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReadIndexResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReadIndexResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReadIndexResponse = ReadIndexResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CommandPri { -pub fn values() -> &'static [Self] { -static VALUES: &'static [CommandPri] = &[ -CommandPri::Normal, -CommandPri::Low, -CommandPri::High, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [CommandPri] = + &[CommandPri::Normal, CommandPri::Low, CommandPri::High]; + VALUES + } } impl IsolationLevel { -pub fn values() -> &'static [Self] { -static VALUES: &'static [IsolationLevel] = &[ -IsolationLevel::Si, -IsolationLevel::Rc, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [IsolationLevel] = &[IsolationLevel::Si, IsolationLevel::Rc]; + VALUES + } } impl Op { -pub fn values() -> &'static [Self] { -static VALUES: &'static [Op] = &[ -Op::Put, -Op::Del, -Op::Lock, -Op::Rollback, -Op::Insert, -Op::PessimisticLock, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [Op] = &[ + Op::Put, + Op::Del, + Op::Lock, + Op::Rollback, + Op::Insert, + Op::PessimisticLock, + ]; + VALUES + } } impl Assertion { -pub fn values() -> &'static [Self] { -static VALUES: &'static [Assertion] = &[ -Assertion::None, -Assertion::Exist, -Assertion::NotExist, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [Assertion] = + &[Assertion::None, Assertion::Exist, Assertion::NotExist]; + VALUES + } } diff --git a/src/prost/wrapper_metapb.rs b/src/prost/wrapper_metapb.rs index 7eca6b225..039a16133 100644 --- a/src/prost/wrapper_metapb.rs +++ b/src/prost/wrapper_metapb.rs @@ -1,304 +1,747 @@ // Generated file, please don't edit manually. impl Cluster { -pub fn new_() -> Cluster { ::std::default::Default::default() } -#[inline] pub fn clear_id(&mut self) { self.id = 0 } -#[inline] pub fn set_id(&mut self, v: u64) { self.id = v; } -#[inline] pub fn get_id(&self) -> u64 { self.id } -#[inline] pub fn clear_max_peer_count(&mut self) { self.max_peer_count = 0 } -#[inline] pub fn set_max_peer_count(&mut self, v: u32) { self.max_peer_count = v; } -#[inline] pub fn get_max_peer_count(&self) -> u32 { self.max_peer_count } + pub fn new_() -> Cluster { + ::std::default::Default::default() + } + #[inline] + pub fn clear_id(&mut self) { + self.id = 0 + } + #[inline] + pub fn set_id(&mut self, v: u64) { + self.id = v; + } + #[inline] + pub fn get_id(&self) -> u64 { + self.id + } + #[inline] + pub fn clear_max_peer_count(&mut self) { + self.max_peer_count = 0 + } + #[inline] + pub fn set_max_peer_count(&mut self, v: u32) { + self.max_peer_count = v; + } + #[inline] + pub fn get_max_peer_count(&self) -> u32 { + self.max_peer_count + } } -impl ::protobuf::Clear for Cluster {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Cluster { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Cluster {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Cluster { - ::lazy_static::lazy_static! { - static ref INSTANCE: Cluster = Cluster::new_(); - } - &*INSTANCE +impl ::protobuf::Message for Cluster { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Cluster { + ::lazy_static::lazy_static! { + static ref INSTANCE: Cluster = Cluster::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl StoreLabel { -pub fn new_() -> StoreLabel { ::std::default::Default::default() } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: string :: String) { self.key = v; } -#[inline] pub fn get_key(&self) -> &str { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: string :: String { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.key, ::std::string::String::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: string :: String) { self.value = v; } -#[inline] pub fn get_value(&self) -> &str { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: string :: String { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.value, ::std::string::String::new()) } + pub fn new_() -> StoreLabel { + ::std::default::Default::default() + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::string::String) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &str { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::string::String { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.key, ::std::string::String::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::string::String) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &str { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::string::String { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.value, ::std::string::String::new()) + } } -impl ::protobuf::Clear for StoreLabel {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for StoreLabel { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for StoreLabel {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StoreLabel { - ::lazy_static::lazy_static! { - static ref INSTANCE: StoreLabel = StoreLabel::new_(); - } - &*INSTANCE +impl ::protobuf::Message for StoreLabel { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StoreLabel { + ::lazy_static::lazy_static! { + static ref INSTANCE: StoreLabel = StoreLabel::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl Store { -pub fn new_() -> Store { ::std::default::Default::default() } -#[inline] pub fn clear_id(&mut self) { self.id = 0 } -#[inline] pub fn set_id(&mut self, v: u64) { self.id = v; } -#[inline] pub fn get_id(&self) -> u64 { self.id } -#[inline] pub fn clear_address(&mut self) { self.address.clear(); } -#[inline] pub fn set_address(&mut self, v: std :: string :: String) { self.address = v; } -#[inline] pub fn get_address(&self) -> &str { &self.address } -#[inline] pub fn mut_address(&mut self) -> &mut std :: string :: String { &mut self.address } -#[inline] pub fn take_address(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.address, ::std::string::String::new()) } -#[inline] pub fn clear_state(&mut self) { self.state = 0 } -#[inline] pub fn set_state_(&mut self, v: StoreState) { self.state = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_state(&self) -> StoreState { unsafe { ::std::mem::transmute::(self.state) } } -#[inline] pub fn clear_labels(&mut self) { self.labels.clear(); } -#[inline] pub fn set_labels(&mut self, v: :: std :: vec :: Vec < StoreLabel >) { self.labels = v; } -#[inline] pub fn get_labels(&self) -> &:: std :: vec :: Vec < StoreLabel > { &self.labels } -#[inline] pub fn mut_labels(&mut self) -> &mut :: std :: vec :: Vec < StoreLabel > { &mut self.labels } -#[inline] pub fn take_labels(&mut self) -> :: std :: vec :: Vec < StoreLabel > { ::std::mem::replace(&mut self.labels, ::std::vec::Vec::new()) } -#[inline] pub fn clear_version(&mut self) { self.version.clear(); } -#[inline] pub fn set_version(&mut self, v: std :: string :: String) { self.version = v; } -#[inline] pub fn get_version(&self) -> &str { &self.version } -#[inline] pub fn mut_version(&mut self) -> &mut std :: string :: String { &mut self.version } -#[inline] pub fn take_version(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.version, ::std::string::String::new()) } + pub fn new_() -> Store { + ::std::default::Default::default() + } + #[inline] + pub fn clear_id(&mut self) { + self.id = 0 + } + #[inline] + pub fn set_id(&mut self, v: u64) { + self.id = v; + } + #[inline] + pub fn get_id(&self) -> u64 { + self.id + } + #[inline] + pub fn clear_address(&mut self) { + self.address.clear(); + } + #[inline] + pub fn set_address(&mut self, v: std::string::String) { + self.address = v; + } + #[inline] + pub fn get_address(&self) -> &str { + &self.address + } + #[inline] + pub fn mut_address(&mut self) -> &mut std::string::String { + &mut self.address + } + #[inline] + pub fn take_address(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.address, ::std::string::String::new()) + } + #[inline] + pub fn clear_state(&mut self) { + self.state = 0 + } + #[inline] + pub fn set_state_(&mut self, v: StoreState) { + self.state = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_state(&self) -> StoreState { + unsafe { ::std::mem::transmute::(self.state) } + } + #[inline] + pub fn clear_labels(&mut self) { + self.labels.clear(); + } + #[inline] + pub fn set_labels(&mut self, v: ::std::vec::Vec) { + self.labels = v; + } + #[inline] + pub fn get_labels(&self) -> &::std::vec::Vec { + &self.labels + } + #[inline] + pub fn mut_labels(&mut self) -> &mut ::std::vec::Vec { + &mut self.labels + } + #[inline] + pub fn take_labels(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.labels, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_version(&mut self) { + self.version.clear(); + } + #[inline] + pub fn set_version(&mut self, v: std::string::String) { + self.version = v; + } + #[inline] + pub fn get_version(&self) -> &str { + &self.version + } + #[inline] + pub fn mut_version(&mut self) -> &mut std::string::String { + &mut self.version + } + #[inline] + pub fn take_version(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.version, ::std::string::String::new()) + } } -impl ::protobuf::Clear for Store {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Store { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Store {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Store { - ::lazy_static::lazy_static! { - static ref INSTANCE: Store = Store::new_(); - } - &*INSTANCE +impl ::protobuf::Message for Store { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Store { + ::lazy_static::lazy_static! { + static ref INSTANCE: Store = Store::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl RegionEpoch { -pub fn new_() -> RegionEpoch { ::std::default::Default::default() } -#[inline] pub fn clear_conf_ver(&mut self) { self.conf_ver = 0 } -#[inline] pub fn set_conf_ver(&mut self, v: u64) { self.conf_ver = v; } -#[inline] pub fn get_conf_ver(&self) -> u64 { self.conf_ver } -#[inline] pub fn clear_version(&mut self) { self.version = 0 } -#[inline] pub fn set_version(&mut self, v: u64) { self.version = v; } -#[inline] pub fn get_version(&self) -> u64 { self.version } + pub fn new_() -> RegionEpoch { + ::std::default::Default::default() + } + #[inline] + pub fn clear_conf_ver(&mut self) { + self.conf_ver = 0 + } + #[inline] + pub fn set_conf_ver(&mut self, v: u64) { + self.conf_ver = v; + } + #[inline] + pub fn get_conf_ver(&self) -> u64 { + self.conf_ver + } + #[inline] + pub fn clear_version(&mut self) { + self.version = 0 + } + #[inline] + pub fn set_version(&mut self, v: u64) { + self.version = v; + } + #[inline] + pub fn get_version(&self) -> u64 { + self.version + } } -impl ::protobuf::Clear for RegionEpoch {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for RegionEpoch { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for RegionEpoch {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionEpoch { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionEpoch = RegionEpoch::new_(); - } - &*INSTANCE +impl ::protobuf::Message for RegionEpoch { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionEpoch { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionEpoch = RegionEpoch::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl Region { -pub fn new_() -> Region { ::std::default::Default::default() } -#[inline] pub fn clear_id(&mut self) { self.id = 0 } -#[inline] pub fn set_id(&mut self, v: u64) { self.id = v; } -#[inline] pub fn get_id(&self) -> u64 { self.id } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -#[inline] pub fn has_region_epoch(&self) -> bool { self.region_epoch.is_some() } -#[inline] pub fn clear_region_epoch(&mut self) { self.region_epoch = ::std::option::Option::None } -#[inline] pub fn set_region_epoch(&mut self, v: RegionEpoch) { self.region_epoch = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_epoch(&self) -> &RegionEpoch { match self.region_epoch.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_epoch(&mut self) -> &mut RegionEpoch { if self.region_epoch.is_none() { - self.region_epoch = ::std::option::Option::Some(RegionEpoch::default()); - } - self.region_epoch.as_mut().unwrap() } -#[inline] pub fn take_region_epoch(&mut self) -> RegionEpoch { self.region_epoch.take().unwrap_or_else(RegionEpoch::default) } -#[inline] pub fn clear_peers(&mut self) { self.peers.clear(); } -#[inline] pub fn set_peers(&mut self, v: :: std :: vec :: Vec < Peer >) { self.peers = v; } -#[inline] pub fn get_peers(&self) -> &:: std :: vec :: Vec < Peer > { &self.peers } -#[inline] pub fn mut_peers(&mut self) -> &mut :: std :: vec :: Vec < Peer > { &mut self.peers } -#[inline] pub fn take_peers(&mut self) -> :: std :: vec :: Vec < Peer > { ::std::mem::replace(&mut self.peers, ::std::vec::Vec::new()) } + pub fn new_() -> Region { + ::std::default::Default::default() + } + #[inline] + pub fn clear_id(&mut self) { + self.id = 0 + } + #[inline] + pub fn set_id(&mut self, v: u64) { + self.id = v; + } + #[inline] + pub fn get_id(&self) -> u64 { + self.id + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_region_epoch(&self) -> bool { + self.region_epoch.is_some() + } + #[inline] + pub fn clear_region_epoch(&mut self) { + self.region_epoch = ::std::option::Option::None + } + #[inline] + pub fn set_region_epoch(&mut self, v: RegionEpoch) { + self.region_epoch = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_epoch(&self) -> &RegionEpoch { + match self.region_epoch.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_epoch(&mut self) -> &mut RegionEpoch { + if self.region_epoch.is_none() { + self.region_epoch = ::std::option::Option::Some(RegionEpoch::default()); + } + self.region_epoch.as_mut().unwrap() + } + #[inline] + pub fn take_region_epoch(&mut self) -> RegionEpoch { + self.region_epoch + .take() + .unwrap_or_else(RegionEpoch::default) + } + #[inline] + pub fn clear_peers(&mut self) { + self.peers.clear(); + } + #[inline] + pub fn set_peers(&mut self, v: ::std::vec::Vec) { + self.peers = v; + } + #[inline] + pub fn get_peers(&self) -> &::std::vec::Vec { + &self.peers + } + #[inline] + pub fn mut_peers(&mut self) -> &mut ::std::vec::Vec { + &mut self.peers + } + #[inline] + pub fn take_peers(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.peers, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for Region {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Region { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Region {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Region { - ::lazy_static::lazy_static! { - static ref INSTANCE: Region = Region::new_(); - } - &*INSTANCE +impl ::protobuf::Message for Region { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Region { + ::lazy_static::lazy_static! { + static ref INSTANCE: Region = Region::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl Peer { -pub fn new_() -> Peer { ::std::default::Default::default() } -#[inline] pub fn clear_id(&mut self) { self.id = 0 } -#[inline] pub fn set_id(&mut self, v: u64) { self.id = v; } -#[inline] pub fn get_id(&self) -> u64 { self.id } -#[inline] pub fn clear_store_id(&mut self) { self.store_id = 0 } -#[inline] pub fn set_store_id(&mut self, v: u64) { self.store_id = v; } -#[inline] pub fn get_store_id(&self) -> u64 { self.store_id } -#[inline] pub fn clear_is_learner(&mut self) { self.is_learner = false } -#[inline] pub fn set_is_learner(&mut self, v: bool) { self.is_learner = v; } -#[inline] pub fn get_is_learner(&self) -> bool { self.is_learner } + pub fn new_() -> Peer { + ::std::default::Default::default() + } + #[inline] + pub fn clear_id(&mut self) { + self.id = 0 + } + #[inline] + pub fn set_id(&mut self, v: u64) { + self.id = v; + } + #[inline] + pub fn get_id(&self) -> u64 { + self.id + } + #[inline] + pub fn clear_store_id(&mut self) { + self.store_id = 0 + } + #[inline] + pub fn set_store_id(&mut self, v: u64) { + self.store_id = v; + } + #[inline] + pub fn get_store_id(&self) -> u64 { + self.store_id + } + #[inline] + pub fn clear_is_learner(&mut self) { + self.is_learner = false + } + #[inline] + pub fn set_is_learner(&mut self, v: bool) { + self.is_learner = v; + } + #[inline] + pub fn get_is_learner(&self) -> bool { + self.is_learner + } } -impl ::protobuf::Clear for Peer {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for Peer { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for Peer {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Peer { - ::lazy_static::lazy_static! { - static ref INSTANCE: Peer = Peer::new_(); - } - &*INSTANCE +impl ::protobuf::Message for Peer { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Peer { + ::lazy_static::lazy_static! { + static ref INSTANCE: Peer = Peer::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl StoreState { -pub fn values() -> &'static [Self] { -static VALUES: &'static [StoreState] = &[ -StoreState::Up, -StoreState::Offline, -StoreState::Tombstone, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [StoreState] = + &[StoreState::Up, StoreState::Offline, StoreState::Tombstone]; + VALUES + } } diff --git a/src/prost/wrapper_pdpb.rs b/src/prost/wrapper_pdpb.rs index 31e72ec01..9e548e743 100644 --- a/src/prost/wrapper_pdpb.rs +++ b/src/prost/wrapper_pdpb.rs @@ -1,3380 +1,7839 @@ // Generated file, please don't edit manually. impl RequestHeader { -pub fn new_() -> RequestHeader { ::std::default::Default::default() } -#[inline] pub fn clear_cluster_id(&mut self) { self.cluster_id = 0 } -#[inline] pub fn set_cluster_id(&mut self, v: u64) { self.cluster_id = v; } -#[inline] pub fn get_cluster_id(&self) -> u64 { self.cluster_id } -} -impl ::protobuf::Clear for RequestHeader {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RequestHeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RequestHeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: RequestHeader = RequestHeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RequestHeader { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cluster_id(&mut self) { + self.cluster_id = 0 + } + #[inline] + pub fn set_cluster_id(&mut self, v: u64) { + self.cluster_id = v; + } + #[inline] + pub fn get_cluster_id(&self) -> u64 { + self.cluster_id + } +} +impl ::protobuf::Clear for RequestHeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RequestHeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RequestHeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: RequestHeader = RequestHeader::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ResponseHeader { -pub fn new_() -> ResponseHeader { ::std::default::Default::default() } -#[inline] pub fn clear_cluster_id(&mut self) { self.cluster_id = 0 } -#[inline] pub fn set_cluster_id(&mut self, v: u64) { self.cluster_id = v; } -#[inline] pub fn get_cluster_id(&self) -> u64 { self.cluster_id } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: Error) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &Error { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut Error { if self.error.is_none() { - self.error = ::std::option::Option::Some(Error::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> Error { self.error.take().unwrap_or_else(Error::default) } -} -impl ::protobuf::Clear for ResponseHeader {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ResponseHeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ResponseHeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: ResponseHeader = ResponseHeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ResponseHeader { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cluster_id(&mut self) { + self.cluster_id = 0 + } + #[inline] + pub fn set_cluster_id(&mut self, v: u64) { + self.cluster_id = v; + } + #[inline] + pub fn get_cluster_id(&self) -> u64 { + self.cluster_id + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: Error) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &Error { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut Error { + if self.error.is_none() { + self.error = ::std::option::Option::Some(Error::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> Error { + self.error.take().unwrap_or_else(Error::default) + } +} +impl ::protobuf::Clear for ResponseHeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ResponseHeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ResponseHeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: ResponseHeader = ResponseHeader::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Error { -pub fn new_() -> Error { ::std::default::Default::default() } -#[inline] pub fn clear_field_type(&mut self) { self.r#type = 0 } -#[inline] pub fn set_field_type_(&mut self, v: ErrorType) { self.r#type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_field_type(&self) -> ErrorType { unsafe { ::std::mem::transmute::(self.r#type) } } -#[inline] pub fn clear_message(&mut self) { self.message.clear(); } -#[inline] pub fn set_message(&mut self, v: std :: string :: String) { self.message = v; } -#[inline] pub fn get_message(&self) -> &str { &self.message } -#[inline] pub fn mut_message(&mut self) -> &mut std :: string :: String { &mut self.message } -#[inline] pub fn take_message(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.message, ::std::string::String::new()) } -} -impl ::protobuf::Clear for Error {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Error {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Error { - ::lazy_static::lazy_static! { - static ref INSTANCE: Error = Error::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Error { + ::std::default::Default::default() + } + #[inline] + pub fn clear_field_type(&mut self) { + self.r#type = 0 + } + #[inline] + pub fn set_field_type_(&mut self, v: ErrorType) { + self.r#type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_field_type(&self) -> ErrorType { + unsafe { ::std::mem::transmute::(self.r#type) } + } + #[inline] + pub fn clear_message(&mut self) { + self.message.clear(); + } + #[inline] + pub fn set_message(&mut self, v: std::string::String) { + self.message = v; + } + #[inline] + pub fn get_message(&self) -> &str { + &self.message + } + #[inline] + pub fn mut_message(&mut self) -> &mut std::string::String { + &mut self.message + } + #[inline] + pub fn take_message(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.message, ::std::string::String::new()) + } +} +impl ::protobuf::Clear for Error { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Error { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Error { + ::lazy_static::lazy_static! { + static ref INSTANCE: Error = Error::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl TsoRequest { -pub fn new_() -> TsoRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_count(&mut self) { self.count = 0 } -#[inline] pub fn set_count(&mut self, v: u32) { self.count = v; } -#[inline] pub fn get_count(&self) -> u32 { self.count } -} -impl ::protobuf::Clear for TsoRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for TsoRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static TsoRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: TsoRequest = TsoRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> TsoRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_count(&mut self) { + self.count = 0 + } + #[inline] + pub fn set_count(&mut self, v: u32) { + self.count = v; + } + #[inline] + pub fn get_count(&self) -> u32 { + self.count + } +} +impl ::protobuf::Clear for TsoRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for TsoRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static TsoRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: TsoRequest = TsoRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Timestamp { -pub fn new_() -> Timestamp { ::std::default::Default::default() } -#[inline] pub fn clear_physical(&mut self) { self.physical = 0 } -#[inline] pub fn set_physical(&mut self, v: i64) { self.physical = v; } -#[inline] pub fn get_physical(&self) -> i64 { self.physical } -#[inline] pub fn clear_logical(&mut self) { self.logical = 0 } -#[inline] pub fn set_logical(&mut self, v: i64) { self.logical = v; } -#[inline] pub fn get_logical(&self) -> i64 { self.logical } -} -impl ::protobuf::Clear for Timestamp {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Timestamp {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Timestamp { - ::lazy_static::lazy_static! { - static ref INSTANCE: Timestamp = Timestamp::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Timestamp { + ::std::default::Default::default() + } + #[inline] + pub fn clear_physical(&mut self) { + self.physical = 0 + } + #[inline] + pub fn set_physical(&mut self, v: i64) { + self.physical = v; + } + #[inline] + pub fn get_physical(&self) -> i64 { + self.physical + } + #[inline] + pub fn clear_logical(&mut self) { + self.logical = 0 + } + #[inline] + pub fn set_logical(&mut self, v: i64) { + self.logical = v; + } + #[inline] + pub fn get_logical(&self) -> i64 { + self.logical + } +} +impl ::protobuf::Clear for Timestamp { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Timestamp { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Timestamp { + ::lazy_static::lazy_static! { + static ref INSTANCE: Timestamp = Timestamp::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl TsoResponse { -pub fn new_() -> TsoResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_count(&mut self) { self.count = 0 } -#[inline] pub fn set_count(&mut self, v: u32) { self.count = v; } -#[inline] pub fn get_count(&self) -> u32 { self.count } -#[inline] pub fn has_timestamp(&self) -> bool { self.timestamp.is_some() } -#[inline] pub fn clear_timestamp(&mut self) { self.timestamp = ::std::option::Option::None } -#[inline] pub fn set_timestamp(&mut self, v: Timestamp) { self.timestamp = ::std::option::Option::Some(v); } -#[inline] pub fn get_timestamp(&self) -> &Timestamp { match self.timestamp.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_timestamp(&mut self) -> &mut Timestamp { if self.timestamp.is_none() { - self.timestamp = ::std::option::Option::Some(Timestamp::default()); - } - self.timestamp.as_mut().unwrap() } -#[inline] pub fn take_timestamp(&mut self) -> Timestamp { self.timestamp.take().unwrap_or_else(Timestamp::default) } -} -impl ::protobuf::Clear for TsoResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for TsoResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static TsoResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: TsoResponse = TsoResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> TsoResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_count(&mut self) { + self.count = 0 + } + #[inline] + pub fn set_count(&mut self, v: u32) { + self.count = v; + } + #[inline] + pub fn get_count(&self) -> u32 { + self.count + } + #[inline] + pub fn has_timestamp(&self) -> bool { + self.timestamp.is_some() + } + #[inline] + pub fn clear_timestamp(&mut self) { + self.timestamp = ::std::option::Option::None + } + #[inline] + pub fn set_timestamp(&mut self, v: Timestamp) { + self.timestamp = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_timestamp(&self) -> &Timestamp { + match self.timestamp.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_timestamp(&mut self) -> &mut Timestamp { + if self.timestamp.is_none() { + self.timestamp = ::std::option::Option::Some(Timestamp::default()); + } + self.timestamp.as_mut().unwrap() + } + #[inline] + pub fn take_timestamp(&mut self) -> Timestamp { + self.timestamp.take().unwrap_or_else(Timestamp::default) + } +} +impl ::protobuf::Clear for TsoResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for TsoResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static TsoResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: TsoResponse = TsoResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BootstrapRequest { -pub fn new_() -> BootstrapRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_store(&self) -> bool { self.store.is_some() } -#[inline] pub fn clear_store(&mut self) { self.store = ::std::option::Option::None } -#[inline] pub fn set_store(&mut self, v: super :: metapb :: Store) { self.store = ::std::option::Option::Some(v); } -#[inline] pub fn get_store(&self) -> &super :: metapb :: Store { match self.store.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_store(&mut self) -> &mut super :: metapb :: Store { if self.store.is_none() { - self.store = ::std::option::Option::Some(super :: metapb :: Store::default()); - } - self.store.as_mut().unwrap() } -#[inline] pub fn take_store(&mut self) -> super :: metapb :: Store { self.store.take().unwrap_or_else(super :: metapb :: Store::default) } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for BootstrapRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BootstrapRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BootstrapRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: BootstrapRequest = BootstrapRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BootstrapRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_store(&self) -> bool { + self.store.is_some() + } + #[inline] + pub fn clear_store(&mut self) { + self.store = ::std::option::Option::None + } + #[inline] + pub fn set_store(&mut self, v: super::metapb::Store) { + self.store = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_store(&self) -> &super::metapb::Store { + match self.store.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_store(&mut self) -> &mut super::metapb::Store { + if self.store.is_none() { + self.store = ::std::option::Option::Some(super::metapb::Store::default()); + } + self.store.as_mut().unwrap() + } + #[inline] + pub fn take_store(&mut self) -> super::metapb::Store { + self.store + .take() + .unwrap_or_else(super::metapb::Store::default) + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for BootstrapRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BootstrapRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BootstrapRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: BootstrapRequest = BootstrapRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BootstrapResponse { -pub fn new_() -> BootstrapResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -} -impl ::protobuf::Clear for BootstrapResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BootstrapResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BootstrapResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: BootstrapResponse = BootstrapResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BootstrapResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } +} +impl ::protobuf::Clear for BootstrapResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BootstrapResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BootstrapResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: BootstrapResponse = BootstrapResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl IsBootstrappedRequest { -pub fn new_() -> IsBootstrappedRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -} -impl ::protobuf::Clear for IsBootstrappedRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for IsBootstrappedRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static IsBootstrappedRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: IsBootstrappedRequest = IsBootstrappedRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> IsBootstrappedRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } +} +impl ::protobuf::Clear for IsBootstrappedRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for IsBootstrappedRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static IsBootstrappedRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: IsBootstrappedRequest = IsBootstrappedRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl IsBootstrappedResponse { -pub fn new_() -> IsBootstrappedResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_bootstrapped(&mut self) { self.bootstrapped = false } -#[inline] pub fn set_bootstrapped(&mut self, v: bool) { self.bootstrapped = v; } -#[inline] pub fn get_bootstrapped(&self) -> bool { self.bootstrapped } -} -impl ::protobuf::Clear for IsBootstrappedResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for IsBootstrappedResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static IsBootstrappedResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: IsBootstrappedResponse = IsBootstrappedResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> IsBootstrappedResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_bootstrapped(&mut self) { + self.bootstrapped = false + } + #[inline] + pub fn set_bootstrapped(&mut self, v: bool) { + self.bootstrapped = v; + } + #[inline] + pub fn get_bootstrapped(&self) -> bool { + self.bootstrapped + } +} +impl ::protobuf::Clear for IsBootstrappedResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for IsBootstrappedResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static IsBootstrappedResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: IsBootstrappedResponse = IsBootstrappedResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AllocIdRequest { -pub fn new_() -> AllocIdRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -} -impl ::protobuf::Clear for AllocIdRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AllocIdRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AllocIdRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: AllocIdRequest = AllocIdRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AllocIdRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } +} +impl ::protobuf::Clear for AllocIdRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AllocIdRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AllocIdRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: AllocIdRequest = AllocIdRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AllocIdResponse { -pub fn new_() -> AllocIdResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_id(&mut self) { self.id = 0 } -#[inline] pub fn set_id(&mut self, v: u64) { self.id = v; } -#[inline] pub fn get_id(&self) -> u64 { self.id } -} -impl ::protobuf::Clear for AllocIdResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AllocIdResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AllocIdResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: AllocIdResponse = AllocIdResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AllocIdResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_id(&mut self) { + self.id = 0 + } + #[inline] + pub fn set_id(&mut self, v: u64) { + self.id = v; + } + #[inline] + pub fn get_id(&self) -> u64 { + self.id + } +} +impl ::protobuf::Clear for AllocIdResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AllocIdResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AllocIdResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: AllocIdResponse = AllocIdResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetStoreRequest { -pub fn new_() -> GetStoreRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_store_id(&mut self) { self.store_id = 0 } -#[inline] pub fn set_store_id(&mut self, v: u64) { self.store_id = v; } -#[inline] pub fn get_store_id(&self) -> u64 { self.store_id } -} -impl ::protobuf::Clear for GetStoreRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetStoreRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetStoreRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetStoreRequest = GetStoreRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetStoreRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_store_id(&mut self) { + self.store_id = 0 + } + #[inline] + pub fn set_store_id(&mut self, v: u64) { + self.store_id = v; + } + #[inline] + pub fn get_store_id(&self) -> u64 { + self.store_id + } +} +impl ::protobuf::Clear for GetStoreRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetStoreRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetStoreRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetStoreRequest = GetStoreRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetStoreResponse { -pub fn new_() -> GetStoreResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn has_store(&self) -> bool { self.store.is_some() } -#[inline] pub fn clear_store(&mut self) { self.store = ::std::option::Option::None } -#[inline] pub fn set_store(&mut self, v: super :: metapb :: Store) { self.store = ::std::option::Option::Some(v); } -#[inline] pub fn get_store(&self) -> &super :: metapb :: Store { match self.store.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_store(&mut self) -> &mut super :: metapb :: Store { if self.store.is_none() { - self.store = ::std::option::Option::Some(super :: metapb :: Store::default()); - } - self.store.as_mut().unwrap() } -#[inline] pub fn take_store(&mut self) -> super :: metapb :: Store { self.store.take().unwrap_or_else(super :: metapb :: Store::default) } -#[inline] pub fn has_stats(&self) -> bool { self.stats.is_some() } -#[inline] pub fn clear_stats(&mut self) { self.stats = ::std::option::Option::None } -#[inline] pub fn set_stats(&mut self, v: StoreStats) { self.stats = ::std::option::Option::Some(v); } -#[inline] pub fn get_stats(&self) -> &StoreStats { match self.stats.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_stats(&mut self) -> &mut StoreStats { if self.stats.is_none() { - self.stats = ::std::option::Option::Some(StoreStats::default()); - } - self.stats.as_mut().unwrap() } -#[inline] pub fn take_stats(&mut self) -> StoreStats { self.stats.take().unwrap_or_else(StoreStats::default) } -} -impl ::protobuf::Clear for GetStoreResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetStoreResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetStoreResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetStoreResponse = GetStoreResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetStoreResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn has_store(&self) -> bool { + self.store.is_some() + } + #[inline] + pub fn clear_store(&mut self) { + self.store = ::std::option::Option::None + } + #[inline] + pub fn set_store(&mut self, v: super::metapb::Store) { + self.store = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_store(&self) -> &super::metapb::Store { + match self.store.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_store(&mut self) -> &mut super::metapb::Store { + if self.store.is_none() { + self.store = ::std::option::Option::Some(super::metapb::Store::default()); + } + self.store.as_mut().unwrap() + } + #[inline] + pub fn take_store(&mut self) -> super::metapb::Store { + self.store + .take() + .unwrap_or_else(super::metapb::Store::default) + } + #[inline] + pub fn has_stats(&self) -> bool { + self.stats.is_some() + } + #[inline] + pub fn clear_stats(&mut self) { + self.stats = ::std::option::Option::None + } + #[inline] + pub fn set_stats(&mut self, v: StoreStats) { + self.stats = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_stats(&self) -> &StoreStats { + match self.stats.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_stats(&mut self) -> &mut StoreStats { + if self.stats.is_none() { + self.stats = ::std::option::Option::Some(StoreStats::default()); + } + self.stats.as_mut().unwrap() + } + #[inline] + pub fn take_stats(&mut self) -> StoreStats { + self.stats.take().unwrap_or_else(StoreStats::default) + } +} +impl ::protobuf::Clear for GetStoreResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetStoreResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetStoreResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetStoreResponse = GetStoreResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PutStoreRequest { -pub fn new_() -> PutStoreRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_store(&self) -> bool { self.store.is_some() } -#[inline] pub fn clear_store(&mut self) { self.store = ::std::option::Option::None } -#[inline] pub fn set_store(&mut self, v: super :: metapb :: Store) { self.store = ::std::option::Option::Some(v); } -#[inline] pub fn get_store(&self) -> &super :: metapb :: Store { match self.store.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_store(&mut self) -> &mut super :: metapb :: Store { if self.store.is_none() { - self.store = ::std::option::Option::Some(super :: metapb :: Store::default()); - } - self.store.as_mut().unwrap() } -#[inline] pub fn take_store(&mut self) -> super :: metapb :: Store { self.store.take().unwrap_or_else(super :: metapb :: Store::default) } -} -impl ::protobuf::Clear for PutStoreRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PutStoreRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PutStoreRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PutStoreRequest = PutStoreRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PutStoreRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_store(&self) -> bool { + self.store.is_some() + } + #[inline] + pub fn clear_store(&mut self) { + self.store = ::std::option::Option::None + } + #[inline] + pub fn set_store(&mut self, v: super::metapb::Store) { + self.store = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_store(&self) -> &super::metapb::Store { + match self.store.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_store(&mut self) -> &mut super::metapb::Store { + if self.store.is_none() { + self.store = ::std::option::Option::Some(super::metapb::Store::default()); + } + self.store.as_mut().unwrap() + } + #[inline] + pub fn take_store(&mut self) -> super::metapb::Store { + self.store + .take() + .unwrap_or_else(super::metapb::Store::default) + } +} +impl ::protobuf::Clear for PutStoreRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PutStoreRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PutStoreRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PutStoreRequest = PutStoreRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PutStoreResponse { -pub fn new_() -> PutStoreResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -} -impl ::protobuf::Clear for PutStoreResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PutStoreResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PutStoreResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PutStoreResponse = PutStoreResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PutStoreResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } +} +impl ::protobuf::Clear for PutStoreResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PutStoreResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PutStoreResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PutStoreResponse = PutStoreResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetAllStoresRequest { -pub fn new_() -> GetAllStoresRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_exclude_tombstone_stores(&mut self) { self.exclude_tombstone_stores = false } -#[inline] pub fn set_exclude_tombstone_stores(&mut self, v: bool) { self.exclude_tombstone_stores = v; } -#[inline] pub fn get_exclude_tombstone_stores(&self) -> bool { self.exclude_tombstone_stores } -} -impl ::protobuf::Clear for GetAllStoresRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetAllStoresRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetAllStoresRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetAllStoresRequest = GetAllStoresRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetAllStoresRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_exclude_tombstone_stores(&mut self) { + self.exclude_tombstone_stores = false + } + #[inline] + pub fn set_exclude_tombstone_stores(&mut self, v: bool) { + self.exclude_tombstone_stores = v; + } + #[inline] + pub fn get_exclude_tombstone_stores(&self) -> bool { + self.exclude_tombstone_stores + } +} +impl ::protobuf::Clear for GetAllStoresRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetAllStoresRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetAllStoresRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetAllStoresRequest = GetAllStoresRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetAllStoresResponse { -pub fn new_() -> GetAllStoresResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_stores(&mut self) { self.stores.clear(); } -#[inline] pub fn set_stores(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Store >) { self.stores = v; } -#[inline] pub fn get_stores(&self) -> &:: std :: vec :: Vec < super :: metapb :: Store > { &self.stores } -#[inline] pub fn mut_stores(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Store > { &mut self.stores } -#[inline] pub fn take_stores(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Store > { ::std::mem::replace(&mut self.stores, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetAllStoresResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetAllStoresResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetAllStoresResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetAllStoresResponse = GetAllStoresResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetAllStoresResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_stores(&mut self) { + self.stores.clear(); + } + #[inline] + pub fn set_stores(&mut self, v: ::std::vec::Vec) { + self.stores = v; + } + #[inline] + pub fn get_stores(&self) -> &::std::vec::Vec { + &self.stores + } + #[inline] + pub fn mut_stores(&mut self) -> &mut ::std::vec::Vec { + &mut self.stores + } + #[inline] + pub fn take_stores(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.stores, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetAllStoresResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetAllStoresResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetAllStoresResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetAllStoresResponse = GetAllStoresResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetRegionRequest { -pub fn new_() -> GetRegionRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_region_key(&mut self) { self.region_key.clear(); } -#[inline] pub fn set_region_key(&mut self, v: std :: vec :: Vec < u8 >) { self.region_key = v; } -#[inline] pub fn get_region_key(&self) -> &[u8] { &self.region_key } -#[inline] pub fn mut_region_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.region_key } -#[inline] pub fn take_region_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.region_key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetRegionRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRegionRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRegionRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRegionRequest = GetRegionRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRegionRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_region_key(&mut self) { + self.region_key.clear(); + } + #[inline] + pub fn set_region_key(&mut self, v: std::vec::Vec) { + self.region_key = v; + } + #[inline] + pub fn get_region_key(&self) -> &[u8] { + &self.region_key + } + #[inline] + pub fn mut_region_key(&mut self) -> &mut std::vec::Vec { + &mut self.region_key + } + #[inline] + pub fn take_region_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.region_key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetRegionRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRegionRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRegionRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRegionRequest = GetRegionRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetRegionResponse { -pub fn new_() -> GetRegionResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_leader(&self) -> bool { self.leader.is_some() } -#[inline] pub fn clear_leader(&mut self) { self.leader = ::std::option::Option::None } -#[inline] pub fn set_leader(&mut self, v: super :: metapb :: Peer) { self.leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_leader(&self) -> &super :: metapb :: Peer { match self.leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_leader(&mut self) -> &mut super :: metapb :: Peer { if self.leader.is_none() { - self.leader = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.leader.as_mut().unwrap() } -#[inline] pub fn take_leader(&mut self) -> super :: metapb :: Peer { self.leader.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn clear_slaves(&mut self) { self.slaves.clear(); } -#[inline] pub fn set_slaves(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Peer >) { self.slaves = v; } -#[inline] pub fn get_slaves(&self) -> &:: std :: vec :: Vec < super :: metapb :: Peer > { &self.slaves } -#[inline] pub fn mut_slaves(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Peer > { &mut self.slaves } -#[inline] pub fn take_slaves(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Peer > { ::std::mem::replace(&mut self.slaves, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetRegionResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRegionResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRegionResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRegionResponse = GetRegionResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRegionResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_leader(&self) -> bool { + self.leader.is_some() + } + #[inline] + pub fn clear_leader(&mut self) { + self.leader = ::std::option::Option::None + } + #[inline] + pub fn set_leader(&mut self, v: super::metapb::Peer) { + self.leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_leader(&self) -> &super::metapb::Peer { + match self.leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_leader(&mut self) -> &mut super::metapb::Peer { + if self.leader.is_none() { + self.leader = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.leader.as_mut().unwrap() + } + #[inline] + pub fn take_leader(&mut self) -> super::metapb::Peer { + self.leader + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn clear_slaves(&mut self) { + self.slaves.clear(); + } + #[inline] + pub fn set_slaves(&mut self, v: ::std::vec::Vec) { + self.slaves = v; + } + #[inline] + pub fn get_slaves(&self) -> &::std::vec::Vec { + &self.slaves + } + #[inline] + pub fn mut_slaves(&mut self) -> &mut ::std::vec::Vec { + &mut self.slaves + } + #[inline] + pub fn take_slaves(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.slaves, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetRegionResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRegionResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRegionResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRegionResponse = GetRegionResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetRegionByIdRequest { -pub fn new_() -> GetRegionByIdRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -} -impl ::protobuf::Clear for GetRegionByIdRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRegionByIdRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRegionByIdRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRegionByIdRequest = GetRegionByIdRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRegionByIdRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } +} +impl ::protobuf::Clear for GetRegionByIdRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRegionByIdRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRegionByIdRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRegionByIdRequest = GetRegionByIdRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanRegionsRequest { -pub fn new_() -> ScanRegionsRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_limit(&mut self) { self.limit = 0 } -#[inline] pub fn set_limit(&mut self, v: i32) { self.limit = v; } -#[inline] pub fn get_limit(&self) -> i32 { self.limit } -} -impl ::protobuf::Clear for ScanRegionsRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanRegionsRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanRegionsRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanRegionsRequest = ScanRegionsRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanRegionsRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_limit(&mut self) { + self.limit = 0 + } + #[inline] + pub fn set_limit(&mut self, v: i32) { + self.limit = v; + } + #[inline] + pub fn get_limit(&self) -> i32 { + self.limit + } +} +impl ::protobuf::Clear for ScanRegionsRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanRegionsRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanRegionsRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanRegionsRequest = ScanRegionsRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScanRegionsResponse { -pub fn new_() -> ScanRegionsResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_regions(&mut self) { self.regions.clear(); } -#[inline] pub fn set_regions(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Region >) { self.regions = v; } -#[inline] pub fn get_regions(&self) -> &:: std :: vec :: Vec < super :: metapb :: Region > { &self.regions } -#[inline] pub fn mut_regions(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Region > { &mut self.regions } -#[inline] pub fn take_regions(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Region > { ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) } -#[inline] pub fn clear_leaders(&mut self) { self.leaders.clear(); } -#[inline] pub fn set_leaders(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Peer >) { self.leaders = v; } -#[inline] pub fn get_leaders(&self) -> &:: std :: vec :: Vec < super :: metapb :: Peer > { &self.leaders } -#[inline] pub fn mut_leaders(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Peer > { &mut self.leaders } -#[inline] pub fn take_leaders(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Peer > { ::std::mem::replace(&mut self.leaders, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for ScanRegionsResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScanRegionsResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScanRegionsResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScanRegionsResponse = ScanRegionsResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScanRegionsResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_regions(&mut self) { + self.regions.clear(); + } + #[inline] + pub fn set_regions(&mut self, v: ::std::vec::Vec) { + self.regions = v; + } + #[inline] + pub fn get_regions(&self) -> &::std::vec::Vec { + &self.regions + } + #[inline] + pub fn mut_regions(&mut self) -> &mut ::std::vec::Vec { + &mut self.regions + } + #[inline] + pub fn take_regions(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_leaders(&mut self) { + self.leaders.clear(); + } + #[inline] + pub fn set_leaders(&mut self, v: ::std::vec::Vec) { + self.leaders = v; + } + #[inline] + pub fn get_leaders(&self) -> &::std::vec::Vec { + &self.leaders + } + #[inline] + pub fn mut_leaders(&mut self) -> &mut ::std::vec::Vec { + &mut self.leaders + } + #[inline] + pub fn take_leaders(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.leaders, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for ScanRegionsResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScanRegionsResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScanRegionsResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScanRegionsResponse = ScanRegionsResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetClusterConfigRequest { -pub fn new_() -> GetClusterConfigRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -} -impl ::protobuf::Clear for GetClusterConfigRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetClusterConfigRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetClusterConfigRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetClusterConfigRequest = GetClusterConfigRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetClusterConfigRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } +} +impl ::protobuf::Clear for GetClusterConfigRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetClusterConfigRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetClusterConfigRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetClusterConfigRequest = GetClusterConfigRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetClusterConfigResponse { -pub fn new_() -> GetClusterConfigResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn has_cluster(&self) -> bool { self.cluster.is_some() } -#[inline] pub fn clear_cluster(&mut self) { self.cluster = ::std::option::Option::None } -#[inline] pub fn set_cluster(&mut self, v: super :: metapb :: Cluster) { self.cluster = ::std::option::Option::Some(v); } -#[inline] pub fn get_cluster(&self) -> &super :: metapb :: Cluster { match self.cluster.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_cluster(&mut self) -> &mut super :: metapb :: Cluster { if self.cluster.is_none() { - self.cluster = ::std::option::Option::Some(super :: metapb :: Cluster::default()); - } - self.cluster.as_mut().unwrap() } -#[inline] pub fn take_cluster(&mut self) -> super :: metapb :: Cluster { self.cluster.take().unwrap_or_else(super :: metapb :: Cluster::default) } -} -impl ::protobuf::Clear for GetClusterConfigResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetClusterConfigResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetClusterConfigResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetClusterConfigResponse = GetClusterConfigResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetClusterConfigResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn has_cluster(&self) -> bool { + self.cluster.is_some() + } + #[inline] + pub fn clear_cluster(&mut self) { + self.cluster = ::std::option::Option::None + } + #[inline] + pub fn set_cluster(&mut self, v: super::metapb::Cluster) { + self.cluster = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_cluster(&self) -> &super::metapb::Cluster { + match self.cluster.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_cluster(&mut self) -> &mut super::metapb::Cluster { + if self.cluster.is_none() { + self.cluster = ::std::option::Option::Some(super::metapb::Cluster::default()); + } + self.cluster.as_mut().unwrap() + } + #[inline] + pub fn take_cluster(&mut self) -> super::metapb::Cluster { + self.cluster + .take() + .unwrap_or_else(super::metapb::Cluster::default) + } +} +impl ::protobuf::Clear for GetClusterConfigResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetClusterConfigResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetClusterConfigResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetClusterConfigResponse = GetClusterConfigResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PutClusterConfigRequest { -pub fn new_() -> PutClusterConfigRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_cluster(&self) -> bool { self.cluster.is_some() } -#[inline] pub fn clear_cluster(&mut self) { self.cluster = ::std::option::Option::None } -#[inline] pub fn set_cluster(&mut self, v: super :: metapb :: Cluster) { self.cluster = ::std::option::Option::Some(v); } -#[inline] pub fn get_cluster(&self) -> &super :: metapb :: Cluster { match self.cluster.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_cluster(&mut self) -> &mut super :: metapb :: Cluster { if self.cluster.is_none() { - self.cluster = ::std::option::Option::Some(super :: metapb :: Cluster::default()); - } - self.cluster.as_mut().unwrap() } -#[inline] pub fn take_cluster(&mut self) -> super :: metapb :: Cluster { self.cluster.take().unwrap_or_else(super :: metapb :: Cluster::default) } -} -impl ::protobuf::Clear for PutClusterConfigRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PutClusterConfigRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PutClusterConfigRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PutClusterConfigRequest = PutClusterConfigRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PutClusterConfigRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_cluster(&self) -> bool { + self.cluster.is_some() + } + #[inline] + pub fn clear_cluster(&mut self) { + self.cluster = ::std::option::Option::None + } + #[inline] + pub fn set_cluster(&mut self, v: super::metapb::Cluster) { + self.cluster = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_cluster(&self) -> &super::metapb::Cluster { + match self.cluster.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_cluster(&mut self) -> &mut super::metapb::Cluster { + if self.cluster.is_none() { + self.cluster = ::std::option::Option::Some(super::metapb::Cluster::default()); + } + self.cluster.as_mut().unwrap() + } + #[inline] + pub fn take_cluster(&mut self) -> super::metapb::Cluster { + self.cluster + .take() + .unwrap_or_else(super::metapb::Cluster::default) + } +} +impl ::protobuf::Clear for PutClusterConfigRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PutClusterConfigRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PutClusterConfigRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PutClusterConfigRequest = PutClusterConfigRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PutClusterConfigResponse { -pub fn new_() -> PutClusterConfigResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -} -impl ::protobuf::Clear for PutClusterConfigResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PutClusterConfigResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PutClusterConfigResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PutClusterConfigResponse = PutClusterConfigResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PutClusterConfigResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } +} +impl ::protobuf::Clear for PutClusterConfigResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PutClusterConfigResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PutClusterConfigResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PutClusterConfigResponse = PutClusterConfigResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Member { -pub fn new_() -> Member { ::std::default::Default::default() } -#[inline] pub fn clear_name(&mut self) { self.name.clear(); } -#[inline] pub fn set_name(&mut self, v: std :: string :: String) { self.name = v; } -#[inline] pub fn get_name(&self) -> &str { &self.name } -#[inline] pub fn mut_name(&mut self) -> &mut std :: string :: String { &mut self.name } -#[inline] pub fn take_name(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.name, ::std::string::String::new()) } -#[inline] pub fn clear_member_id(&mut self) { self.member_id = 0 } -#[inline] pub fn set_member_id(&mut self, v: u64) { self.member_id = v; } -#[inline] pub fn get_member_id(&self) -> u64 { self.member_id } -#[inline] pub fn clear_peer_urls(&mut self) { self.peer_urls.clear(); } -#[inline] pub fn set_peer_urls(&mut self, v: :: std :: vec :: Vec < std :: string :: String >) { self.peer_urls = v; } -#[inline] pub fn get_peer_urls(&self) -> &:: std :: vec :: Vec < std :: string :: String > { &self.peer_urls } -#[inline] pub fn mut_peer_urls(&mut self) -> &mut :: std :: vec :: Vec < std :: string :: String > { &mut self.peer_urls } -#[inline] pub fn take_peer_urls(&mut self) -> :: std :: vec :: Vec < std :: string :: String > { ::std::mem::replace(&mut self.peer_urls, ::std::vec::Vec::new()) } -#[inline] pub fn clear_client_urls(&mut self) { self.client_urls.clear(); } -#[inline] pub fn set_client_urls(&mut self, v: :: std :: vec :: Vec < std :: string :: String >) { self.client_urls = v; } -#[inline] pub fn get_client_urls(&self) -> &:: std :: vec :: Vec < std :: string :: String > { &self.client_urls } -#[inline] pub fn mut_client_urls(&mut self) -> &mut :: std :: vec :: Vec < std :: string :: String > { &mut self.client_urls } -#[inline] pub fn take_client_urls(&mut self) -> :: std :: vec :: Vec < std :: string :: String > { ::std::mem::replace(&mut self.client_urls, ::std::vec::Vec::new()) } -#[inline] pub fn clear_leader_priority(&mut self) { self.leader_priority = 0 } -#[inline] pub fn set_leader_priority(&mut self, v: i32) { self.leader_priority = v; } -#[inline] pub fn get_leader_priority(&self) -> i32 { self.leader_priority } -} -impl ::protobuf::Clear for Member {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Member {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Member { - ::lazy_static::lazy_static! { - static ref INSTANCE: Member = Member::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Member { + ::std::default::Default::default() + } + #[inline] + pub fn clear_name(&mut self) { + self.name.clear(); + } + #[inline] + pub fn set_name(&mut self, v: std::string::String) { + self.name = v; + } + #[inline] + pub fn get_name(&self) -> &str { + &self.name + } + #[inline] + pub fn mut_name(&mut self) -> &mut std::string::String { + &mut self.name + } + #[inline] + pub fn take_name(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } + #[inline] + pub fn clear_member_id(&mut self) { + self.member_id = 0 + } + #[inline] + pub fn set_member_id(&mut self, v: u64) { + self.member_id = v; + } + #[inline] + pub fn get_member_id(&self) -> u64 { + self.member_id + } + #[inline] + pub fn clear_peer_urls(&mut self) { + self.peer_urls.clear(); + } + #[inline] + pub fn set_peer_urls(&mut self, v: ::std::vec::Vec) { + self.peer_urls = v; + } + #[inline] + pub fn get_peer_urls(&self) -> &::std::vec::Vec { + &self.peer_urls + } + #[inline] + pub fn mut_peer_urls(&mut self) -> &mut ::std::vec::Vec { + &mut self.peer_urls + } + #[inline] + pub fn take_peer_urls(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.peer_urls, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_client_urls(&mut self) { + self.client_urls.clear(); + } + #[inline] + pub fn set_client_urls(&mut self, v: ::std::vec::Vec) { + self.client_urls = v; + } + #[inline] + pub fn get_client_urls(&self) -> &::std::vec::Vec { + &self.client_urls + } + #[inline] + pub fn mut_client_urls(&mut self) -> &mut ::std::vec::Vec { + &mut self.client_urls + } + #[inline] + pub fn take_client_urls(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.client_urls, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_leader_priority(&mut self) { + self.leader_priority = 0 + } + #[inline] + pub fn set_leader_priority(&mut self, v: i32) { + self.leader_priority = v; + } + #[inline] + pub fn get_leader_priority(&self) -> i32 { + self.leader_priority + } +} +impl ::protobuf::Clear for Member { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Member { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Member { + ::lazy_static::lazy_static! { + static ref INSTANCE: Member = Member::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetMembersRequest { -pub fn new_() -> GetMembersRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -} -impl ::protobuf::Clear for GetMembersRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetMembersRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetMembersRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetMembersRequest = GetMembersRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetMembersRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } +} +impl ::protobuf::Clear for GetMembersRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetMembersRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetMembersRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetMembersRequest = GetMembersRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetMembersResponse { -pub fn new_() -> GetMembersResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_members(&mut self) { self.members.clear(); } -#[inline] pub fn set_members(&mut self, v: :: std :: vec :: Vec < Member >) { self.members = v; } -#[inline] pub fn get_members(&self) -> &:: std :: vec :: Vec < Member > { &self.members } -#[inline] pub fn mut_members(&mut self) -> &mut :: std :: vec :: Vec < Member > { &mut self.members } -#[inline] pub fn take_members(&mut self) -> :: std :: vec :: Vec < Member > { ::std::mem::replace(&mut self.members, ::std::vec::Vec::new()) } -#[inline] pub fn has_leader(&self) -> bool { self.leader.is_some() } -#[inline] pub fn clear_leader(&mut self) { self.leader = ::std::option::Option::None } -#[inline] pub fn set_leader(&mut self, v: Member) { self.leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_leader(&self) -> &Member { match self.leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_leader(&mut self) -> &mut Member { if self.leader.is_none() { - self.leader = ::std::option::Option::Some(Member::default()); - } - self.leader.as_mut().unwrap() } -#[inline] pub fn take_leader(&mut self) -> Member { self.leader.take().unwrap_or_else(Member::default) } -#[inline] pub fn has_etcd_leader(&self) -> bool { self.etcd_leader.is_some() } -#[inline] pub fn clear_etcd_leader(&mut self) { self.etcd_leader = ::std::option::Option::None } -#[inline] pub fn set_etcd_leader(&mut self, v: Member) { self.etcd_leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_etcd_leader(&self) -> &Member { match self.etcd_leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_etcd_leader(&mut self) -> &mut Member { if self.etcd_leader.is_none() { - self.etcd_leader = ::std::option::Option::Some(Member::default()); - } - self.etcd_leader.as_mut().unwrap() } -#[inline] pub fn take_etcd_leader(&mut self) -> Member { self.etcd_leader.take().unwrap_or_else(Member::default) } -} -impl ::protobuf::Clear for GetMembersResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetMembersResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetMembersResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetMembersResponse = GetMembersResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetMembersResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_members(&mut self) { + self.members.clear(); + } + #[inline] + pub fn set_members(&mut self, v: ::std::vec::Vec) { + self.members = v; + } + #[inline] + pub fn get_members(&self) -> &::std::vec::Vec { + &self.members + } + #[inline] + pub fn mut_members(&mut self) -> &mut ::std::vec::Vec { + &mut self.members + } + #[inline] + pub fn take_members(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.members, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_leader(&self) -> bool { + self.leader.is_some() + } + #[inline] + pub fn clear_leader(&mut self) { + self.leader = ::std::option::Option::None + } + #[inline] + pub fn set_leader(&mut self, v: Member) { + self.leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_leader(&self) -> &Member { + match self.leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_leader(&mut self) -> &mut Member { + if self.leader.is_none() { + self.leader = ::std::option::Option::Some(Member::default()); + } + self.leader.as_mut().unwrap() + } + #[inline] + pub fn take_leader(&mut self) -> Member { + self.leader.take().unwrap_or_else(Member::default) + } + #[inline] + pub fn has_etcd_leader(&self) -> bool { + self.etcd_leader.is_some() + } + #[inline] + pub fn clear_etcd_leader(&mut self) { + self.etcd_leader = ::std::option::Option::None + } + #[inline] + pub fn set_etcd_leader(&mut self, v: Member) { + self.etcd_leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_etcd_leader(&self) -> &Member { + match self.etcd_leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_etcd_leader(&mut self) -> &mut Member { + if self.etcd_leader.is_none() { + self.etcd_leader = ::std::option::Option::Some(Member::default()); + } + self.etcd_leader.as_mut().unwrap() + } + #[inline] + pub fn take_etcd_leader(&mut self) -> Member { + self.etcd_leader.take().unwrap_or_else(Member::default) + } +} +impl ::protobuf::Clear for GetMembersResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetMembersResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetMembersResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetMembersResponse = GetMembersResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PeerStats { -pub fn new_() -> PeerStats { ::std::default::Default::default() } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn clear_down_seconds(&mut self) { self.down_seconds = 0 } -#[inline] pub fn set_down_seconds(&mut self, v: u64) { self.down_seconds = v; } -#[inline] pub fn get_down_seconds(&self) -> u64 { self.down_seconds } -} -impl ::protobuf::Clear for PeerStats {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PeerStats {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PeerStats { - ::lazy_static::lazy_static! { - static ref INSTANCE: PeerStats = PeerStats::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PeerStats { + ::std::default::Default::default() + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn clear_down_seconds(&mut self) { + self.down_seconds = 0 + } + #[inline] + pub fn set_down_seconds(&mut self, v: u64) { + self.down_seconds = v; + } + #[inline] + pub fn get_down_seconds(&self) -> u64 { + self.down_seconds + } +} +impl ::protobuf::Clear for PeerStats { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PeerStats { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PeerStats { + ::lazy_static::lazy_static! { + static ref INSTANCE: PeerStats = PeerStats::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionHeartbeatRequest { -pub fn new_() -> RegionHeartbeatRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_leader(&self) -> bool { self.leader.is_some() } -#[inline] pub fn clear_leader(&mut self) { self.leader = ::std::option::Option::None } -#[inline] pub fn set_leader(&mut self, v: super :: metapb :: Peer) { self.leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_leader(&self) -> &super :: metapb :: Peer { match self.leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_leader(&mut self) -> &mut super :: metapb :: Peer { if self.leader.is_none() { - self.leader = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.leader.as_mut().unwrap() } -#[inline] pub fn take_leader(&mut self) -> super :: metapb :: Peer { self.leader.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn clear_down_peers(&mut self) { self.down_peers.clear(); } -#[inline] pub fn set_down_peers(&mut self, v: :: std :: vec :: Vec < PeerStats >) { self.down_peers = v; } -#[inline] pub fn get_down_peers(&self) -> &:: std :: vec :: Vec < PeerStats > { &self.down_peers } -#[inline] pub fn mut_down_peers(&mut self) -> &mut :: std :: vec :: Vec < PeerStats > { &mut self.down_peers } -#[inline] pub fn take_down_peers(&mut self) -> :: std :: vec :: Vec < PeerStats > { ::std::mem::replace(&mut self.down_peers, ::std::vec::Vec::new()) } -#[inline] pub fn clear_pending_peers(&mut self) { self.pending_peers.clear(); } -#[inline] pub fn set_pending_peers(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Peer >) { self.pending_peers = v; } -#[inline] pub fn get_pending_peers(&self) -> &:: std :: vec :: Vec < super :: metapb :: Peer > { &self.pending_peers } -#[inline] pub fn mut_pending_peers(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Peer > { &mut self.pending_peers } -#[inline] pub fn take_pending_peers(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Peer > { ::std::mem::replace(&mut self.pending_peers, ::std::vec::Vec::new()) } -#[inline] pub fn clear_bytes_written(&mut self) { self.bytes_written = 0 } -#[inline] pub fn set_bytes_written(&mut self, v: u64) { self.bytes_written = v; } -#[inline] pub fn get_bytes_written(&self) -> u64 { self.bytes_written } -#[inline] pub fn clear_bytes_read(&mut self) { self.bytes_read = 0 } -#[inline] pub fn set_bytes_read(&mut self, v: u64) { self.bytes_read = v; } -#[inline] pub fn get_bytes_read(&self) -> u64 { self.bytes_read } -#[inline] pub fn clear_keys_written(&mut self) { self.keys_written = 0 } -#[inline] pub fn set_keys_written(&mut self, v: u64) { self.keys_written = v; } -#[inline] pub fn get_keys_written(&self) -> u64 { self.keys_written } -#[inline] pub fn clear_keys_read(&mut self) { self.keys_read = 0 } -#[inline] pub fn set_keys_read(&mut self, v: u64) { self.keys_read = v; } -#[inline] pub fn get_keys_read(&self) -> u64 { self.keys_read } -#[inline] pub fn clear_approximate_size(&mut self) { self.approximate_size = 0 } -#[inline] pub fn set_approximate_size(&mut self, v: u64) { self.approximate_size = v; } -#[inline] pub fn get_approximate_size(&self) -> u64 { self.approximate_size } -#[inline] pub fn has_interval(&self) -> bool { self.interval.is_some() } -#[inline] pub fn clear_interval(&mut self) { self.interval = ::std::option::Option::None } -#[inline] pub fn set_interval(&mut self, v: TimeInterval) { self.interval = ::std::option::Option::Some(v); } -#[inline] pub fn get_interval(&self) -> &TimeInterval { match self.interval.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_interval(&mut self) -> &mut TimeInterval { if self.interval.is_none() { - self.interval = ::std::option::Option::Some(TimeInterval::default()); - } - self.interval.as_mut().unwrap() } -#[inline] pub fn take_interval(&mut self) -> TimeInterval { self.interval.take().unwrap_or_else(TimeInterval::default) } -#[inline] pub fn clear_approximate_keys(&mut self) { self.approximate_keys = 0 } -#[inline] pub fn set_approximate_keys(&mut self, v: u64) { self.approximate_keys = v; } -#[inline] pub fn get_approximate_keys(&self) -> u64 { self.approximate_keys } -} -impl ::protobuf::Clear for RegionHeartbeatRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionHeartbeatRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionHeartbeatRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionHeartbeatRequest = RegionHeartbeatRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionHeartbeatRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_leader(&self) -> bool { + self.leader.is_some() + } + #[inline] + pub fn clear_leader(&mut self) { + self.leader = ::std::option::Option::None + } + #[inline] + pub fn set_leader(&mut self, v: super::metapb::Peer) { + self.leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_leader(&self) -> &super::metapb::Peer { + match self.leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_leader(&mut self) -> &mut super::metapb::Peer { + if self.leader.is_none() { + self.leader = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.leader.as_mut().unwrap() + } + #[inline] + pub fn take_leader(&mut self) -> super::metapb::Peer { + self.leader + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn clear_down_peers(&mut self) { + self.down_peers.clear(); + } + #[inline] + pub fn set_down_peers(&mut self, v: ::std::vec::Vec) { + self.down_peers = v; + } + #[inline] + pub fn get_down_peers(&self) -> &::std::vec::Vec { + &self.down_peers + } + #[inline] + pub fn mut_down_peers(&mut self) -> &mut ::std::vec::Vec { + &mut self.down_peers + } + #[inline] + pub fn take_down_peers(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.down_peers, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_pending_peers(&mut self) { + self.pending_peers.clear(); + } + #[inline] + pub fn set_pending_peers(&mut self, v: ::std::vec::Vec) { + self.pending_peers = v; + } + #[inline] + pub fn get_pending_peers(&self) -> &::std::vec::Vec { + &self.pending_peers + } + #[inline] + pub fn mut_pending_peers(&mut self) -> &mut ::std::vec::Vec { + &mut self.pending_peers + } + #[inline] + pub fn take_pending_peers(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.pending_peers, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_bytes_written(&mut self) { + self.bytes_written = 0 + } + #[inline] + pub fn set_bytes_written(&mut self, v: u64) { + self.bytes_written = v; + } + #[inline] + pub fn get_bytes_written(&self) -> u64 { + self.bytes_written + } + #[inline] + pub fn clear_bytes_read(&mut self) { + self.bytes_read = 0 + } + #[inline] + pub fn set_bytes_read(&mut self, v: u64) { + self.bytes_read = v; + } + #[inline] + pub fn get_bytes_read(&self) -> u64 { + self.bytes_read + } + #[inline] + pub fn clear_keys_written(&mut self) { + self.keys_written = 0 + } + #[inline] + pub fn set_keys_written(&mut self, v: u64) { + self.keys_written = v; + } + #[inline] + pub fn get_keys_written(&self) -> u64 { + self.keys_written + } + #[inline] + pub fn clear_keys_read(&mut self) { + self.keys_read = 0 + } + #[inline] + pub fn set_keys_read(&mut self, v: u64) { + self.keys_read = v; + } + #[inline] + pub fn get_keys_read(&self) -> u64 { + self.keys_read + } + #[inline] + pub fn clear_approximate_size(&mut self) { + self.approximate_size = 0 + } + #[inline] + pub fn set_approximate_size(&mut self, v: u64) { + self.approximate_size = v; + } + #[inline] + pub fn get_approximate_size(&self) -> u64 { + self.approximate_size + } + #[inline] + pub fn has_interval(&self) -> bool { + self.interval.is_some() + } + #[inline] + pub fn clear_interval(&mut self) { + self.interval = ::std::option::Option::None + } + #[inline] + pub fn set_interval(&mut self, v: TimeInterval) { + self.interval = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_interval(&self) -> &TimeInterval { + match self.interval.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_interval(&mut self) -> &mut TimeInterval { + if self.interval.is_none() { + self.interval = ::std::option::Option::Some(TimeInterval::default()); + } + self.interval.as_mut().unwrap() + } + #[inline] + pub fn take_interval(&mut self) -> TimeInterval { + self.interval.take().unwrap_or_else(TimeInterval::default) + } + #[inline] + pub fn clear_approximate_keys(&mut self) { + self.approximate_keys = 0 + } + #[inline] + pub fn set_approximate_keys(&mut self, v: u64) { + self.approximate_keys = v; + } + #[inline] + pub fn get_approximate_keys(&self) -> u64 { + self.approximate_keys + } +} +impl ::protobuf::Clear for RegionHeartbeatRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionHeartbeatRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionHeartbeatRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionHeartbeatRequest = RegionHeartbeatRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ChangePeer { -pub fn new_() -> ChangePeer { ::std::default::Default::default() } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn clear_change_type(&mut self) { self.change_type = 0 } -#[inline] pub fn set_change_type_(&mut self, v: super::eraftpb::ConfChangeType) { self.change_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_change_type(&self) -> super::eraftpb::ConfChangeType { unsafe { ::std::mem::transmute::(self.change_type) } } -} -impl ::protobuf::Clear for ChangePeer {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ChangePeer {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ChangePeer { - ::lazy_static::lazy_static! { - static ref INSTANCE: ChangePeer = ChangePeer::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ChangePeer { + ::std::default::Default::default() + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn clear_change_type(&mut self) { + self.change_type = 0 + } + #[inline] + pub fn set_change_type_(&mut self, v: super::eraftpb::ConfChangeType) { + self.change_type = + unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_change_type(&self) -> super::eraftpb::ConfChangeType { + unsafe { ::std::mem::transmute::(self.change_type) } + } +} +impl ::protobuf::Clear for ChangePeer { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ChangePeer { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ChangePeer { + ::lazy_static::lazy_static! { + static ref INSTANCE: ChangePeer = ChangePeer::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl TransferLeader { -pub fn new_() -> TransferLeader { ::std::default::Default::default() } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -} -impl ::protobuf::Clear for TransferLeader {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for TransferLeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static TransferLeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: TransferLeader = TransferLeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> TransferLeader { + ::std::default::Default::default() + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } +} +impl ::protobuf::Clear for TransferLeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for TransferLeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static TransferLeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: TransferLeader = TransferLeader::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Merge { -pub fn new_() -> Merge { ::std::default::Default::default() } -#[inline] pub fn has_target(&self) -> bool { self.target.is_some() } -#[inline] pub fn clear_target(&mut self) { self.target = ::std::option::Option::None } -#[inline] pub fn set_target(&mut self, v: super :: metapb :: Region) { self.target = ::std::option::Option::Some(v); } -#[inline] pub fn get_target(&self) -> &super :: metapb :: Region { match self.target.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_target(&mut self) -> &mut super :: metapb :: Region { if self.target.is_none() { - self.target = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.target.as_mut().unwrap() } -#[inline] pub fn take_target(&mut self) -> super :: metapb :: Region { self.target.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for Merge {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Merge {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Merge { - ::lazy_static::lazy_static! { - static ref INSTANCE: Merge = Merge::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Merge { + ::std::default::Default::default() + } + #[inline] + pub fn has_target(&self) -> bool { + self.target.is_some() + } + #[inline] + pub fn clear_target(&mut self) { + self.target = ::std::option::Option::None + } + #[inline] + pub fn set_target(&mut self, v: super::metapb::Region) { + self.target = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_target(&self) -> &super::metapb::Region { + match self.target.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_target(&mut self) -> &mut super::metapb::Region { + if self.target.is_none() { + self.target = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.target.as_mut().unwrap() + } + #[inline] + pub fn take_target(&mut self) -> super::metapb::Region { + self.target + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for Merge { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Merge { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Merge { + ::lazy_static::lazy_static! { + static ref INSTANCE: Merge = Merge::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SplitRegion { -pub fn new_() -> SplitRegion { ::std::default::Default::default() } -#[inline] pub fn clear_policy(&mut self) { self.policy = 0 } -#[inline] pub fn set_policy_(&mut self, v: CheckPolicy) { self.policy = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_policy(&self) -> CheckPolicy { unsafe { ::std::mem::transmute::(self.policy) } } -} -impl ::protobuf::Clear for SplitRegion {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SplitRegion {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SplitRegion { - ::lazy_static::lazy_static! { - static ref INSTANCE: SplitRegion = SplitRegion::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SplitRegion { + ::std::default::Default::default() + } + #[inline] + pub fn clear_policy(&mut self) { + self.policy = 0 + } + #[inline] + pub fn set_policy_(&mut self, v: CheckPolicy) { + self.policy = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_policy(&self) -> CheckPolicy { + unsafe { ::std::mem::transmute::(self.policy) } + } +} +impl ::protobuf::Clear for SplitRegion { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SplitRegion { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SplitRegion { + ::lazy_static::lazy_static! { + static ref INSTANCE: SplitRegion = SplitRegion::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionHeartbeatResponse { -pub fn new_() -> RegionHeartbeatResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn has_change_peer(&self) -> bool { self.change_peer.is_some() } -#[inline] pub fn clear_change_peer(&mut self) { self.change_peer = ::std::option::Option::None } -#[inline] pub fn set_change_peer(&mut self, v: ChangePeer) { self.change_peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_change_peer(&self) -> &ChangePeer { match self.change_peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_change_peer(&mut self) -> &mut ChangePeer { if self.change_peer.is_none() { - self.change_peer = ::std::option::Option::Some(ChangePeer::default()); - } - self.change_peer.as_mut().unwrap() } -#[inline] pub fn take_change_peer(&mut self) -> ChangePeer { self.change_peer.take().unwrap_or_else(ChangePeer::default) } -#[inline] pub fn has_transfer_leader(&self) -> bool { self.transfer_leader.is_some() } -#[inline] pub fn clear_transfer_leader(&mut self) { self.transfer_leader = ::std::option::Option::None } -#[inline] pub fn set_transfer_leader(&mut self, v: TransferLeader) { self.transfer_leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_transfer_leader(&self) -> &TransferLeader { match self.transfer_leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_transfer_leader(&mut self) -> &mut TransferLeader { if self.transfer_leader.is_none() { - self.transfer_leader = ::std::option::Option::Some(TransferLeader::default()); - } - self.transfer_leader.as_mut().unwrap() } -#[inline] pub fn take_transfer_leader(&mut self) -> TransferLeader { self.transfer_leader.take().unwrap_or_else(TransferLeader::default) } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn has_region_epoch(&self) -> bool { self.region_epoch.is_some() } -#[inline] pub fn clear_region_epoch(&mut self) { self.region_epoch = ::std::option::Option::None } -#[inline] pub fn set_region_epoch(&mut self, v: super :: metapb :: RegionEpoch) { self.region_epoch = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_epoch(&self) -> &super :: metapb :: RegionEpoch { match self.region_epoch.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_epoch(&mut self) -> &mut super :: metapb :: RegionEpoch { if self.region_epoch.is_none() { - self.region_epoch = ::std::option::Option::Some(super :: metapb :: RegionEpoch::default()); - } - self.region_epoch.as_mut().unwrap() } -#[inline] pub fn take_region_epoch(&mut self) -> super :: metapb :: RegionEpoch { self.region_epoch.take().unwrap_or_else(super :: metapb :: RegionEpoch::default) } -#[inline] pub fn has_target_peer(&self) -> bool { self.target_peer.is_some() } -#[inline] pub fn clear_target_peer(&mut self) { self.target_peer = ::std::option::Option::None } -#[inline] pub fn set_target_peer(&mut self, v: super :: metapb :: Peer) { self.target_peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_target_peer(&self) -> &super :: metapb :: Peer { match self.target_peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_target_peer(&mut self) -> &mut super :: metapb :: Peer { if self.target_peer.is_none() { - self.target_peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.target_peer.as_mut().unwrap() } -#[inline] pub fn take_target_peer(&mut self) -> super :: metapb :: Peer { self.target_peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn has_merge(&self) -> bool { self.merge.is_some() } -#[inline] pub fn clear_merge(&mut self) { self.merge = ::std::option::Option::None } -#[inline] pub fn set_merge(&mut self, v: Merge) { self.merge = ::std::option::Option::Some(v); } -#[inline] pub fn get_merge(&self) -> &Merge { match self.merge.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_merge(&mut self) -> &mut Merge { if self.merge.is_none() { - self.merge = ::std::option::Option::Some(Merge::default()); - } - self.merge.as_mut().unwrap() } -#[inline] pub fn take_merge(&mut self) -> Merge { self.merge.take().unwrap_or_else(Merge::default) } -#[inline] pub fn has_split_region(&self) -> bool { self.split_region.is_some() } -#[inline] pub fn clear_split_region(&mut self) { self.split_region = ::std::option::Option::None } -#[inline] pub fn set_split_region(&mut self, v: SplitRegion) { self.split_region = ::std::option::Option::Some(v); } -#[inline] pub fn get_split_region(&self) -> &SplitRegion { match self.split_region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_split_region(&mut self) -> &mut SplitRegion { if self.split_region.is_none() { - self.split_region = ::std::option::Option::Some(SplitRegion::default()); - } - self.split_region.as_mut().unwrap() } -#[inline] pub fn take_split_region(&mut self) -> SplitRegion { self.split_region.take().unwrap_or_else(SplitRegion::default) } -} -impl ::protobuf::Clear for RegionHeartbeatResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionHeartbeatResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionHeartbeatResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionHeartbeatResponse = RegionHeartbeatResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionHeartbeatResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn has_change_peer(&self) -> bool { + self.change_peer.is_some() + } + #[inline] + pub fn clear_change_peer(&mut self) { + self.change_peer = ::std::option::Option::None + } + #[inline] + pub fn set_change_peer(&mut self, v: ChangePeer) { + self.change_peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_change_peer(&self) -> &ChangePeer { + match self.change_peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_change_peer(&mut self) -> &mut ChangePeer { + if self.change_peer.is_none() { + self.change_peer = ::std::option::Option::Some(ChangePeer::default()); + } + self.change_peer.as_mut().unwrap() + } + #[inline] + pub fn take_change_peer(&mut self) -> ChangePeer { + self.change_peer.take().unwrap_or_else(ChangePeer::default) + } + #[inline] + pub fn has_transfer_leader(&self) -> bool { + self.transfer_leader.is_some() + } + #[inline] + pub fn clear_transfer_leader(&mut self) { + self.transfer_leader = ::std::option::Option::None + } + #[inline] + pub fn set_transfer_leader(&mut self, v: TransferLeader) { + self.transfer_leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_transfer_leader(&self) -> &TransferLeader { + match self.transfer_leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_transfer_leader(&mut self) -> &mut TransferLeader { + if self.transfer_leader.is_none() { + self.transfer_leader = ::std::option::Option::Some(TransferLeader::default()); + } + self.transfer_leader.as_mut().unwrap() + } + #[inline] + pub fn take_transfer_leader(&mut self) -> TransferLeader { + self.transfer_leader + .take() + .unwrap_or_else(TransferLeader::default) + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn has_region_epoch(&self) -> bool { + self.region_epoch.is_some() + } + #[inline] + pub fn clear_region_epoch(&mut self) { + self.region_epoch = ::std::option::Option::None + } + #[inline] + pub fn set_region_epoch(&mut self, v: super::metapb::RegionEpoch) { + self.region_epoch = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_epoch(&self) -> &super::metapb::RegionEpoch { + match self.region_epoch.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_epoch(&mut self) -> &mut super::metapb::RegionEpoch { + if self.region_epoch.is_none() { + self.region_epoch = ::std::option::Option::Some(super::metapb::RegionEpoch::default()); + } + self.region_epoch.as_mut().unwrap() + } + #[inline] + pub fn take_region_epoch(&mut self) -> super::metapb::RegionEpoch { + self.region_epoch + .take() + .unwrap_or_else(super::metapb::RegionEpoch::default) + } + #[inline] + pub fn has_target_peer(&self) -> bool { + self.target_peer.is_some() + } + #[inline] + pub fn clear_target_peer(&mut self) { + self.target_peer = ::std::option::Option::None + } + #[inline] + pub fn set_target_peer(&mut self, v: super::metapb::Peer) { + self.target_peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_target_peer(&self) -> &super::metapb::Peer { + match self.target_peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_target_peer(&mut self) -> &mut super::metapb::Peer { + if self.target_peer.is_none() { + self.target_peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.target_peer.as_mut().unwrap() + } + #[inline] + pub fn take_target_peer(&mut self) -> super::metapb::Peer { + self.target_peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn has_merge(&self) -> bool { + self.merge.is_some() + } + #[inline] + pub fn clear_merge(&mut self) { + self.merge = ::std::option::Option::None + } + #[inline] + pub fn set_merge(&mut self, v: Merge) { + self.merge = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_merge(&self) -> &Merge { + match self.merge.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_merge(&mut self) -> &mut Merge { + if self.merge.is_none() { + self.merge = ::std::option::Option::Some(Merge::default()); + } + self.merge.as_mut().unwrap() + } + #[inline] + pub fn take_merge(&mut self) -> Merge { + self.merge.take().unwrap_or_else(Merge::default) + } + #[inline] + pub fn has_split_region(&self) -> bool { + self.split_region.is_some() + } + #[inline] + pub fn clear_split_region(&mut self) { + self.split_region = ::std::option::Option::None + } + #[inline] + pub fn set_split_region(&mut self, v: SplitRegion) { + self.split_region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_split_region(&self) -> &SplitRegion { + match self.split_region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_split_region(&mut self) -> &mut SplitRegion { + if self.split_region.is_none() { + self.split_region = ::std::option::Option::Some(SplitRegion::default()); + } + self.split_region.as_mut().unwrap() + } + #[inline] + pub fn take_split_region(&mut self) -> SplitRegion { + self.split_region + .take() + .unwrap_or_else(SplitRegion::default) + } +} +impl ::protobuf::Clear for RegionHeartbeatResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionHeartbeatResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionHeartbeatResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionHeartbeatResponse = RegionHeartbeatResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AskSplitRequest { -pub fn new_() -> AskSplitRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for AskSplitRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AskSplitRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AskSplitRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: AskSplitRequest = AskSplitRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AskSplitRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for AskSplitRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AskSplitRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AskSplitRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: AskSplitRequest = AskSplitRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AskSplitResponse { -pub fn new_() -> AskSplitResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_new_region_id(&mut self) { self.new_region_id = 0 } -#[inline] pub fn set_new_region_id(&mut self, v: u64) { self.new_region_id = v; } -#[inline] pub fn get_new_region_id(&self) -> u64 { self.new_region_id } -#[inline] pub fn clear_new_peer_ids(&mut self) { self.new_peer_ids.clear(); } -#[inline] pub fn set_new_peer_ids(&mut self, v: :: std :: vec :: Vec < u64 >) { self.new_peer_ids = v; } -#[inline] pub fn get_new_peer_ids(&self) -> &:: std :: vec :: Vec < u64 > { &self.new_peer_ids } -#[inline] pub fn mut_new_peer_ids(&mut self) -> &mut :: std :: vec :: Vec < u64 > { &mut self.new_peer_ids } -#[inline] pub fn take_new_peer_ids(&mut self) -> :: std :: vec :: Vec < u64 > { ::std::mem::replace(&mut self.new_peer_ids, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for AskSplitResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AskSplitResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AskSplitResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: AskSplitResponse = AskSplitResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AskSplitResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_new_region_id(&mut self) { + self.new_region_id = 0 + } + #[inline] + pub fn set_new_region_id(&mut self, v: u64) { + self.new_region_id = v; + } + #[inline] + pub fn get_new_region_id(&self) -> u64 { + self.new_region_id + } + #[inline] + pub fn clear_new_peer_ids(&mut self) { + self.new_peer_ids.clear(); + } + #[inline] + pub fn set_new_peer_ids(&mut self, v: ::std::vec::Vec) { + self.new_peer_ids = v; + } + #[inline] + pub fn get_new_peer_ids(&self) -> &::std::vec::Vec { + &self.new_peer_ids + } + #[inline] + pub fn mut_new_peer_ids(&mut self) -> &mut ::std::vec::Vec { + &mut self.new_peer_ids + } + #[inline] + pub fn take_new_peer_ids(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.new_peer_ids, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for AskSplitResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AskSplitResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AskSplitResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: AskSplitResponse = AskSplitResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReportSplitRequest { -pub fn new_() -> ReportSplitRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_left(&self) -> bool { self.left.is_some() } -#[inline] pub fn clear_left(&mut self) { self.left = ::std::option::Option::None } -#[inline] pub fn set_left(&mut self, v: super :: metapb :: Region) { self.left = ::std::option::Option::Some(v); } -#[inline] pub fn get_left(&self) -> &super :: metapb :: Region { match self.left.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_left(&mut self) -> &mut super :: metapb :: Region { if self.left.is_none() { - self.left = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.left.as_mut().unwrap() } -#[inline] pub fn take_left(&mut self) -> super :: metapb :: Region { self.left.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_right(&self) -> bool { self.right.is_some() } -#[inline] pub fn clear_right(&mut self) { self.right = ::std::option::Option::None } -#[inline] pub fn set_right(&mut self, v: super :: metapb :: Region) { self.right = ::std::option::Option::Some(v); } -#[inline] pub fn get_right(&self) -> &super :: metapb :: Region { match self.right.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_right(&mut self) -> &mut super :: metapb :: Region { if self.right.is_none() { - self.right = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.right.as_mut().unwrap() } -#[inline] pub fn take_right(&mut self) -> super :: metapb :: Region { self.right.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for ReportSplitRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReportSplitRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReportSplitRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReportSplitRequest = ReportSplitRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReportSplitRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_left(&self) -> bool { + self.left.is_some() + } + #[inline] + pub fn clear_left(&mut self) { + self.left = ::std::option::Option::None + } + #[inline] + pub fn set_left(&mut self, v: super::metapb::Region) { + self.left = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_left(&self) -> &super::metapb::Region { + match self.left.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_left(&mut self) -> &mut super::metapb::Region { + if self.left.is_none() { + self.left = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.left.as_mut().unwrap() + } + #[inline] + pub fn take_left(&mut self) -> super::metapb::Region { + self.left + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_right(&self) -> bool { + self.right.is_some() + } + #[inline] + pub fn clear_right(&mut self) { + self.right = ::std::option::Option::None + } + #[inline] + pub fn set_right(&mut self, v: super::metapb::Region) { + self.right = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_right(&self) -> &super::metapb::Region { + match self.right.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_right(&mut self) -> &mut super::metapb::Region { + if self.right.is_none() { + self.right = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.right.as_mut().unwrap() + } + #[inline] + pub fn take_right(&mut self) -> super::metapb::Region { + self.right + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for ReportSplitRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReportSplitRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReportSplitRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReportSplitRequest = ReportSplitRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReportSplitResponse { -pub fn new_() -> ReportSplitResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -} -impl ::protobuf::Clear for ReportSplitResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReportSplitResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReportSplitResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReportSplitResponse = ReportSplitResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReportSplitResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } +} +impl ::protobuf::Clear for ReportSplitResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReportSplitResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReportSplitResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReportSplitResponse = ReportSplitResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AskBatchSplitRequest { -pub fn new_() -> AskBatchSplitRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn clear_split_count(&mut self) { self.split_count = 0 } -#[inline] pub fn set_split_count(&mut self, v: u32) { self.split_count = v; } -#[inline] pub fn get_split_count(&self) -> u32 { self.split_count } -} -impl ::protobuf::Clear for AskBatchSplitRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AskBatchSplitRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AskBatchSplitRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: AskBatchSplitRequest = AskBatchSplitRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AskBatchSplitRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn clear_split_count(&mut self) { + self.split_count = 0 + } + #[inline] + pub fn set_split_count(&mut self, v: u32) { + self.split_count = v; + } + #[inline] + pub fn get_split_count(&self) -> u32 { + self.split_count + } +} +impl ::protobuf::Clear for AskBatchSplitRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AskBatchSplitRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AskBatchSplitRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: AskBatchSplitRequest = AskBatchSplitRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SplitId { -pub fn new_() -> SplitId { ::std::default::Default::default() } -#[inline] pub fn clear_new_region_id(&mut self) { self.new_region_id = 0 } -#[inline] pub fn set_new_region_id(&mut self, v: u64) { self.new_region_id = v; } -#[inline] pub fn get_new_region_id(&self) -> u64 { self.new_region_id } -#[inline] pub fn clear_new_peer_ids(&mut self) { self.new_peer_ids.clear(); } -#[inline] pub fn set_new_peer_ids(&mut self, v: :: std :: vec :: Vec < u64 >) { self.new_peer_ids = v; } -#[inline] pub fn get_new_peer_ids(&self) -> &:: std :: vec :: Vec < u64 > { &self.new_peer_ids } -#[inline] pub fn mut_new_peer_ids(&mut self) -> &mut :: std :: vec :: Vec < u64 > { &mut self.new_peer_ids } -#[inline] pub fn take_new_peer_ids(&mut self) -> :: std :: vec :: Vec < u64 > { ::std::mem::replace(&mut self.new_peer_ids, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for SplitId {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SplitId {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SplitId { - ::lazy_static::lazy_static! { - static ref INSTANCE: SplitId = SplitId::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SplitId { + ::std::default::Default::default() + } + #[inline] + pub fn clear_new_region_id(&mut self) { + self.new_region_id = 0 + } + #[inline] + pub fn set_new_region_id(&mut self, v: u64) { + self.new_region_id = v; + } + #[inline] + pub fn get_new_region_id(&self) -> u64 { + self.new_region_id + } + #[inline] + pub fn clear_new_peer_ids(&mut self) { + self.new_peer_ids.clear(); + } + #[inline] + pub fn set_new_peer_ids(&mut self, v: ::std::vec::Vec) { + self.new_peer_ids = v; + } + #[inline] + pub fn get_new_peer_ids(&self) -> &::std::vec::Vec { + &self.new_peer_ids + } + #[inline] + pub fn mut_new_peer_ids(&mut self) -> &mut ::std::vec::Vec { + &mut self.new_peer_ids + } + #[inline] + pub fn take_new_peer_ids(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.new_peer_ids, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for SplitId { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SplitId { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SplitId { + ::lazy_static::lazy_static! { + static ref INSTANCE: SplitId = SplitId::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AskBatchSplitResponse { -pub fn new_() -> AskBatchSplitResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_ids(&mut self) { self.ids.clear(); } -#[inline] pub fn set_ids(&mut self, v: :: std :: vec :: Vec < SplitId >) { self.ids = v; } -#[inline] pub fn get_ids(&self) -> &:: std :: vec :: Vec < SplitId > { &self.ids } -#[inline] pub fn mut_ids(&mut self) -> &mut :: std :: vec :: Vec < SplitId > { &mut self.ids } -#[inline] pub fn take_ids(&mut self) -> :: std :: vec :: Vec < SplitId > { ::std::mem::replace(&mut self.ids, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for AskBatchSplitResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AskBatchSplitResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AskBatchSplitResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: AskBatchSplitResponse = AskBatchSplitResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AskBatchSplitResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_ids(&mut self) { + self.ids.clear(); + } + #[inline] + pub fn set_ids(&mut self, v: ::std::vec::Vec) { + self.ids = v; + } + #[inline] + pub fn get_ids(&self) -> &::std::vec::Vec { + &self.ids + } + #[inline] + pub fn mut_ids(&mut self) -> &mut ::std::vec::Vec { + &mut self.ids + } + #[inline] + pub fn take_ids(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.ids, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for AskBatchSplitResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AskBatchSplitResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AskBatchSplitResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: AskBatchSplitResponse = AskBatchSplitResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReportBatchSplitRequest { -pub fn new_() -> ReportBatchSplitRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_regions(&mut self) { self.regions.clear(); } -#[inline] pub fn set_regions(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Region >) { self.regions = v; } -#[inline] pub fn get_regions(&self) -> &:: std :: vec :: Vec < super :: metapb :: Region > { &self.regions } -#[inline] pub fn mut_regions(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Region > { &mut self.regions } -#[inline] pub fn take_regions(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Region > { ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for ReportBatchSplitRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReportBatchSplitRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReportBatchSplitRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReportBatchSplitRequest = ReportBatchSplitRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReportBatchSplitRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_regions(&mut self) { + self.regions.clear(); + } + #[inline] + pub fn set_regions(&mut self, v: ::std::vec::Vec) { + self.regions = v; + } + #[inline] + pub fn get_regions(&self) -> &::std::vec::Vec { + &self.regions + } + #[inline] + pub fn mut_regions(&mut self) -> &mut ::std::vec::Vec { + &mut self.regions + } + #[inline] + pub fn take_regions(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for ReportBatchSplitRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReportBatchSplitRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReportBatchSplitRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReportBatchSplitRequest = ReportBatchSplitRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReportBatchSplitResponse { -pub fn new_() -> ReportBatchSplitResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -} -impl ::protobuf::Clear for ReportBatchSplitResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReportBatchSplitResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReportBatchSplitResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReportBatchSplitResponse = ReportBatchSplitResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReportBatchSplitResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } +} +impl ::protobuf::Clear for ReportBatchSplitResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReportBatchSplitResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReportBatchSplitResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReportBatchSplitResponse = ReportBatchSplitResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl TimeInterval { -pub fn new_() -> TimeInterval { ::std::default::Default::default() } -#[inline] pub fn clear_start_timestamp(&mut self) { self.start_timestamp = 0 } -#[inline] pub fn set_start_timestamp(&mut self, v: u64) { self.start_timestamp = v; } -#[inline] pub fn get_start_timestamp(&self) -> u64 { self.start_timestamp } -#[inline] pub fn clear_end_timestamp(&mut self) { self.end_timestamp = 0 } -#[inline] pub fn set_end_timestamp(&mut self, v: u64) { self.end_timestamp = v; } -#[inline] pub fn get_end_timestamp(&self) -> u64 { self.end_timestamp } -} -impl ::protobuf::Clear for TimeInterval {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for TimeInterval {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static TimeInterval { - ::lazy_static::lazy_static! { - static ref INSTANCE: TimeInterval = TimeInterval::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> TimeInterval { + ::std::default::Default::default() + } + #[inline] + pub fn clear_start_timestamp(&mut self) { + self.start_timestamp = 0 + } + #[inline] + pub fn set_start_timestamp(&mut self, v: u64) { + self.start_timestamp = v; + } + #[inline] + pub fn get_start_timestamp(&self) -> u64 { + self.start_timestamp + } + #[inline] + pub fn clear_end_timestamp(&mut self) { + self.end_timestamp = 0 + } + #[inline] + pub fn set_end_timestamp(&mut self, v: u64) { + self.end_timestamp = v; + } + #[inline] + pub fn get_end_timestamp(&self) -> u64 { + self.end_timestamp + } +} +impl ::protobuf::Clear for TimeInterval { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for TimeInterval { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static TimeInterval { + ::lazy_static::lazy_static! { + static ref INSTANCE: TimeInterval = TimeInterval::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl StoreStats { -pub fn new_() -> StoreStats { ::std::default::Default::default() } -#[inline] pub fn clear_store_id(&mut self) { self.store_id = 0 } -#[inline] pub fn set_store_id(&mut self, v: u64) { self.store_id = v; } -#[inline] pub fn get_store_id(&self) -> u64 { self.store_id } -#[inline] pub fn clear_capacity(&mut self) { self.capacity = 0 } -#[inline] pub fn set_capacity(&mut self, v: u64) { self.capacity = v; } -#[inline] pub fn get_capacity(&self) -> u64 { self.capacity } -#[inline] pub fn clear_available(&mut self) { self.available = 0 } -#[inline] pub fn set_available(&mut self, v: u64) { self.available = v; } -#[inline] pub fn get_available(&self) -> u64 { self.available } -#[inline] pub fn clear_region_count(&mut self) { self.region_count = 0 } -#[inline] pub fn set_region_count(&mut self, v: u32) { self.region_count = v; } -#[inline] pub fn get_region_count(&self) -> u32 { self.region_count } -#[inline] pub fn clear_sending_snap_count(&mut self) { self.sending_snap_count = 0 } -#[inline] pub fn set_sending_snap_count(&mut self, v: u32) { self.sending_snap_count = v; } -#[inline] pub fn get_sending_snap_count(&self) -> u32 { self.sending_snap_count } -#[inline] pub fn clear_receiving_snap_count(&mut self) { self.receiving_snap_count = 0 } -#[inline] pub fn set_receiving_snap_count(&mut self, v: u32) { self.receiving_snap_count = v; } -#[inline] pub fn get_receiving_snap_count(&self) -> u32 { self.receiving_snap_count } -#[inline] pub fn clear_start_time(&mut self) { self.start_time = 0 } -#[inline] pub fn set_start_time(&mut self, v: u32) { self.start_time = v; } -#[inline] pub fn get_start_time(&self) -> u32 { self.start_time } -#[inline] pub fn clear_applying_snap_count(&mut self) { self.applying_snap_count = 0 } -#[inline] pub fn set_applying_snap_count(&mut self, v: u32) { self.applying_snap_count = v; } -#[inline] pub fn get_applying_snap_count(&self) -> u32 { self.applying_snap_count } -#[inline] pub fn clear_is_busy(&mut self) { self.is_busy = false } -#[inline] pub fn set_is_busy(&mut self, v: bool) { self.is_busy = v; } -#[inline] pub fn get_is_busy(&self) -> bool { self.is_busy } -#[inline] pub fn clear_used_size(&mut self) { self.used_size = 0 } -#[inline] pub fn set_used_size(&mut self, v: u64) { self.used_size = v; } -#[inline] pub fn get_used_size(&self) -> u64 { self.used_size } -#[inline] pub fn clear_bytes_written(&mut self) { self.bytes_written = 0 } -#[inline] pub fn set_bytes_written(&mut self, v: u64) { self.bytes_written = v; } -#[inline] pub fn get_bytes_written(&self) -> u64 { self.bytes_written } -#[inline] pub fn clear_keys_written(&mut self) { self.keys_written = 0 } -#[inline] pub fn set_keys_written(&mut self, v: u64) { self.keys_written = v; } -#[inline] pub fn get_keys_written(&self) -> u64 { self.keys_written } -#[inline] pub fn clear_bytes_read(&mut self) { self.bytes_read = 0 } -#[inline] pub fn set_bytes_read(&mut self, v: u64) { self.bytes_read = v; } -#[inline] pub fn get_bytes_read(&self) -> u64 { self.bytes_read } -#[inline] pub fn clear_keys_read(&mut self) { self.keys_read = 0 } -#[inline] pub fn set_keys_read(&mut self, v: u64) { self.keys_read = v; } -#[inline] pub fn get_keys_read(&self) -> u64 { self.keys_read } -#[inline] pub fn has_interval(&self) -> bool { self.interval.is_some() } -#[inline] pub fn clear_interval(&mut self) { self.interval = ::std::option::Option::None } -#[inline] pub fn set_interval(&mut self, v: TimeInterval) { self.interval = ::std::option::Option::Some(v); } -#[inline] pub fn get_interval(&self) -> &TimeInterval { match self.interval.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_interval(&mut self) -> &mut TimeInterval { if self.interval.is_none() { - self.interval = ::std::option::Option::Some(TimeInterval::default()); - } - self.interval.as_mut().unwrap() } -#[inline] pub fn take_interval(&mut self) -> TimeInterval { self.interval.take().unwrap_or_else(TimeInterval::default) } -} -impl ::protobuf::Clear for StoreStats {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for StoreStats {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StoreStats { - ::lazy_static::lazy_static! { - static ref INSTANCE: StoreStats = StoreStats::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> StoreStats { + ::std::default::Default::default() + } + #[inline] + pub fn clear_store_id(&mut self) { + self.store_id = 0 + } + #[inline] + pub fn set_store_id(&mut self, v: u64) { + self.store_id = v; + } + #[inline] + pub fn get_store_id(&self) -> u64 { + self.store_id + } + #[inline] + pub fn clear_capacity(&mut self) { + self.capacity = 0 + } + #[inline] + pub fn set_capacity(&mut self, v: u64) { + self.capacity = v; + } + #[inline] + pub fn get_capacity(&self) -> u64 { + self.capacity + } + #[inline] + pub fn clear_available(&mut self) { + self.available = 0 + } + #[inline] + pub fn set_available(&mut self, v: u64) { + self.available = v; + } + #[inline] + pub fn get_available(&self) -> u64 { + self.available + } + #[inline] + pub fn clear_region_count(&mut self) { + self.region_count = 0 + } + #[inline] + pub fn set_region_count(&mut self, v: u32) { + self.region_count = v; + } + #[inline] + pub fn get_region_count(&self) -> u32 { + self.region_count + } + #[inline] + pub fn clear_sending_snap_count(&mut self) { + self.sending_snap_count = 0 + } + #[inline] + pub fn set_sending_snap_count(&mut self, v: u32) { + self.sending_snap_count = v; + } + #[inline] + pub fn get_sending_snap_count(&self) -> u32 { + self.sending_snap_count + } + #[inline] + pub fn clear_receiving_snap_count(&mut self) { + self.receiving_snap_count = 0 + } + #[inline] + pub fn set_receiving_snap_count(&mut self, v: u32) { + self.receiving_snap_count = v; + } + #[inline] + pub fn get_receiving_snap_count(&self) -> u32 { + self.receiving_snap_count + } + #[inline] + pub fn clear_start_time(&mut self) { + self.start_time = 0 + } + #[inline] + pub fn set_start_time(&mut self, v: u32) { + self.start_time = v; + } + #[inline] + pub fn get_start_time(&self) -> u32 { + self.start_time + } + #[inline] + pub fn clear_applying_snap_count(&mut self) { + self.applying_snap_count = 0 + } + #[inline] + pub fn set_applying_snap_count(&mut self, v: u32) { + self.applying_snap_count = v; + } + #[inline] + pub fn get_applying_snap_count(&self) -> u32 { + self.applying_snap_count + } + #[inline] + pub fn clear_is_busy(&mut self) { + self.is_busy = false + } + #[inline] + pub fn set_is_busy(&mut self, v: bool) { + self.is_busy = v; + } + #[inline] + pub fn get_is_busy(&self) -> bool { + self.is_busy + } + #[inline] + pub fn clear_used_size(&mut self) { + self.used_size = 0 + } + #[inline] + pub fn set_used_size(&mut self, v: u64) { + self.used_size = v; + } + #[inline] + pub fn get_used_size(&self) -> u64 { + self.used_size + } + #[inline] + pub fn clear_bytes_written(&mut self) { + self.bytes_written = 0 + } + #[inline] + pub fn set_bytes_written(&mut self, v: u64) { + self.bytes_written = v; + } + #[inline] + pub fn get_bytes_written(&self) -> u64 { + self.bytes_written + } + #[inline] + pub fn clear_keys_written(&mut self) { + self.keys_written = 0 + } + #[inline] + pub fn set_keys_written(&mut self, v: u64) { + self.keys_written = v; + } + #[inline] + pub fn get_keys_written(&self) -> u64 { + self.keys_written + } + #[inline] + pub fn clear_bytes_read(&mut self) { + self.bytes_read = 0 + } + #[inline] + pub fn set_bytes_read(&mut self, v: u64) { + self.bytes_read = v; + } + #[inline] + pub fn get_bytes_read(&self) -> u64 { + self.bytes_read + } + #[inline] + pub fn clear_keys_read(&mut self) { + self.keys_read = 0 + } + #[inline] + pub fn set_keys_read(&mut self, v: u64) { + self.keys_read = v; + } + #[inline] + pub fn get_keys_read(&self) -> u64 { + self.keys_read + } + #[inline] + pub fn has_interval(&self) -> bool { + self.interval.is_some() + } + #[inline] + pub fn clear_interval(&mut self) { + self.interval = ::std::option::Option::None + } + #[inline] + pub fn set_interval(&mut self, v: TimeInterval) { + self.interval = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_interval(&self) -> &TimeInterval { + match self.interval.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_interval(&mut self) -> &mut TimeInterval { + if self.interval.is_none() { + self.interval = ::std::option::Option::Some(TimeInterval::default()); + } + self.interval.as_mut().unwrap() + } + #[inline] + pub fn take_interval(&mut self) -> TimeInterval { + self.interval.take().unwrap_or_else(TimeInterval::default) + } +} +impl ::protobuf::Clear for StoreStats { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for StoreStats { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StoreStats { + ::lazy_static::lazy_static! { + static ref INSTANCE: StoreStats = StoreStats::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl StoreHeartbeatRequest { -pub fn new_() -> StoreHeartbeatRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_stats(&self) -> bool { self.stats.is_some() } -#[inline] pub fn clear_stats(&mut self) { self.stats = ::std::option::Option::None } -#[inline] pub fn set_stats(&mut self, v: StoreStats) { self.stats = ::std::option::Option::Some(v); } -#[inline] pub fn get_stats(&self) -> &StoreStats { match self.stats.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_stats(&mut self) -> &mut StoreStats { if self.stats.is_none() { - self.stats = ::std::option::Option::Some(StoreStats::default()); - } - self.stats.as_mut().unwrap() } -#[inline] pub fn take_stats(&mut self) -> StoreStats { self.stats.take().unwrap_or_else(StoreStats::default) } -} -impl ::protobuf::Clear for StoreHeartbeatRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for StoreHeartbeatRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StoreHeartbeatRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: StoreHeartbeatRequest = StoreHeartbeatRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> StoreHeartbeatRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_stats(&self) -> bool { + self.stats.is_some() + } + #[inline] + pub fn clear_stats(&mut self) { + self.stats = ::std::option::Option::None + } + #[inline] + pub fn set_stats(&mut self, v: StoreStats) { + self.stats = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_stats(&self) -> &StoreStats { + match self.stats.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_stats(&mut self) -> &mut StoreStats { + if self.stats.is_none() { + self.stats = ::std::option::Option::Some(StoreStats::default()); + } + self.stats.as_mut().unwrap() + } + #[inline] + pub fn take_stats(&mut self) -> StoreStats { + self.stats.take().unwrap_or_else(StoreStats::default) + } +} +impl ::protobuf::Clear for StoreHeartbeatRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for StoreHeartbeatRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StoreHeartbeatRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: StoreHeartbeatRequest = StoreHeartbeatRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl StoreHeartbeatResponse { -pub fn new_() -> StoreHeartbeatResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -} -impl ::protobuf::Clear for StoreHeartbeatResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for StoreHeartbeatResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StoreHeartbeatResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: StoreHeartbeatResponse = StoreHeartbeatResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> StoreHeartbeatResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } +} +impl ::protobuf::Clear for StoreHeartbeatResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for StoreHeartbeatResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StoreHeartbeatResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: StoreHeartbeatResponse = StoreHeartbeatResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScatterRegionRequest { -pub fn new_() -> ScatterRegionRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_leader(&self) -> bool { self.leader.is_some() } -#[inline] pub fn clear_leader(&mut self) { self.leader = ::std::option::Option::None } -#[inline] pub fn set_leader(&mut self, v: super :: metapb :: Peer) { self.leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_leader(&self) -> &super :: metapb :: Peer { match self.leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_leader(&mut self) -> &mut super :: metapb :: Peer { if self.leader.is_none() { - self.leader = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.leader.as_mut().unwrap() } -#[inline] pub fn take_leader(&mut self) -> super :: metapb :: Peer { self.leader.take().unwrap_or_else(super :: metapb :: Peer::default) } -} -impl ::protobuf::Clear for ScatterRegionRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScatterRegionRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScatterRegionRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScatterRegionRequest = ScatterRegionRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScatterRegionRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_leader(&self) -> bool { + self.leader.is_some() + } + #[inline] + pub fn clear_leader(&mut self) { + self.leader = ::std::option::Option::None + } + #[inline] + pub fn set_leader(&mut self, v: super::metapb::Peer) { + self.leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_leader(&self) -> &super::metapb::Peer { + match self.leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_leader(&mut self) -> &mut super::metapb::Peer { + if self.leader.is_none() { + self.leader = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.leader.as_mut().unwrap() + } + #[inline] + pub fn take_leader(&mut self) -> super::metapb::Peer { + self.leader + .take() + .unwrap_or_else(super::metapb::Peer::default) + } +} +impl ::protobuf::Clear for ScatterRegionRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScatterRegionRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScatterRegionRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScatterRegionRequest = ScatterRegionRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ScatterRegionResponse { -pub fn new_() -> ScatterRegionResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -} -impl ::protobuf::Clear for ScatterRegionResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ScatterRegionResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ScatterRegionResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ScatterRegionResponse = ScatterRegionResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ScatterRegionResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } +} +impl ::protobuf::Clear for ScatterRegionResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ScatterRegionResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ScatterRegionResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ScatterRegionResponse = ScatterRegionResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetGcSafePointRequest { -pub fn new_() -> GetGcSafePointRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -} -impl ::protobuf::Clear for GetGcSafePointRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetGcSafePointRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetGcSafePointRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetGcSafePointRequest = GetGcSafePointRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetGcSafePointRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } +} +impl ::protobuf::Clear for GetGcSafePointRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetGcSafePointRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetGcSafePointRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetGcSafePointRequest = GetGcSafePointRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetGcSafePointResponse { -pub fn new_() -> GetGcSafePointResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_safe_point(&mut self) { self.safe_point = 0 } -#[inline] pub fn set_safe_point(&mut self, v: u64) { self.safe_point = v; } -#[inline] pub fn get_safe_point(&self) -> u64 { self.safe_point } -} -impl ::protobuf::Clear for GetGcSafePointResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetGcSafePointResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetGcSafePointResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetGcSafePointResponse = GetGcSafePointResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetGcSafePointResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_safe_point(&mut self) { + self.safe_point = 0 + } + #[inline] + pub fn set_safe_point(&mut self, v: u64) { + self.safe_point = v; + } + #[inline] + pub fn get_safe_point(&self) -> u64 { + self.safe_point + } +} +impl ::protobuf::Clear for GetGcSafePointResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetGcSafePointResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetGcSafePointResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetGcSafePointResponse = GetGcSafePointResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl UpdateGcSafePointRequest { -pub fn new_() -> UpdateGcSafePointRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_safe_point(&mut self) { self.safe_point = 0 } -#[inline] pub fn set_safe_point(&mut self, v: u64) { self.safe_point = v; } -#[inline] pub fn get_safe_point(&self) -> u64 { self.safe_point } -} -impl ::protobuf::Clear for UpdateGcSafePointRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for UpdateGcSafePointRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static UpdateGcSafePointRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: UpdateGcSafePointRequest = UpdateGcSafePointRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> UpdateGcSafePointRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_safe_point(&mut self) { + self.safe_point = 0 + } + #[inline] + pub fn set_safe_point(&mut self, v: u64) { + self.safe_point = v; + } + #[inline] + pub fn get_safe_point(&self) -> u64 { + self.safe_point + } +} +impl ::protobuf::Clear for UpdateGcSafePointRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for UpdateGcSafePointRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static UpdateGcSafePointRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: UpdateGcSafePointRequest = UpdateGcSafePointRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl UpdateGcSafePointResponse { -pub fn new_() -> UpdateGcSafePointResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_new_safe_point(&mut self) { self.new_safe_point = 0 } -#[inline] pub fn set_new_safe_point(&mut self, v: u64) { self.new_safe_point = v; } -#[inline] pub fn get_new_safe_point(&self) -> u64 { self.new_safe_point } -} -impl ::protobuf::Clear for UpdateGcSafePointResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for UpdateGcSafePointResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static UpdateGcSafePointResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: UpdateGcSafePointResponse = UpdateGcSafePointResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> UpdateGcSafePointResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_new_safe_point(&mut self) { + self.new_safe_point = 0 + } + #[inline] + pub fn set_new_safe_point(&mut self, v: u64) { + self.new_safe_point = v; + } + #[inline] + pub fn get_new_safe_point(&self) -> u64 { + self.new_safe_point + } +} +impl ::protobuf::Clear for UpdateGcSafePointResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for UpdateGcSafePointResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static UpdateGcSafePointResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: UpdateGcSafePointResponse = UpdateGcSafePointResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SyncRegionRequest { -pub fn new_() -> SyncRegionRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn has_member(&self) -> bool { self.member.is_some() } -#[inline] pub fn clear_member(&mut self) { self.member = ::std::option::Option::None } -#[inline] pub fn set_member(&mut self, v: Member) { self.member = ::std::option::Option::Some(v); } -#[inline] pub fn get_member(&self) -> &Member { match self.member.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_member(&mut self) -> &mut Member { if self.member.is_none() { - self.member = ::std::option::Option::Some(Member::default()); - } - self.member.as_mut().unwrap() } -#[inline] pub fn take_member(&mut self) -> Member { self.member.take().unwrap_or_else(Member::default) } -#[inline] pub fn clear_start_index(&mut self) { self.start_index = 0 } -#[inline] pub fn set_start_index(&mut self, v: u64) { self.start_index = v; } -#[inline] pub fn get_start_index(&self) -> u64 { self.start_index } -} -impl ::protobuf::Clear for SyncRegionRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SyncRegionRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SyncRegionRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: SyncRegionRequest = SyncRegionRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SyncRegionRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn has_member(&self) -> bool { + self.member.is_some() + } + #[inline] + pub fn clear_member(&mut self) { + self.member = ::std::option::Option::None + } + #[inline] + pub fn set_member(&mut self, v: Member) { + self.member = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_member(&self) -> &Member { + match self.member.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_member(&mut self) -> &mut Member { + if self.member.is_none() { + self.member = ::std::option::Option::Some(Member::default()); + } + self.member.as_mut().unwrap() + } + #[inline] + pub fn take_member(&mut self) -> Member { + self.member.take().unwrap_or_else(Member::default) + } + #[inline] + pub fn clear_start_index(&mut self) { + self.start_index = 0 + } + #[inline] + pub fn set_start_index(&mut self, v: u64) { + self.start_index = v; + } + #[inline] + pub fn get_start_index(&self) -> u64 { + self.start_index + } +} +impl ::protobuf::Clear for SyncRegionRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SyncRegionRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SyncRegionRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: SyncRegionRequest = SyncRegionRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SyncRegionResponse { -pub fn new_() -> SyncRegionResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_regions(&mut self) { self.regions.clear(); } -#[inline] pub fn set_regions(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Region >) { self.regions = v; } -#[inline] pub fn get_regions(&self) -> &:: std :: vec :: Vec < super :: metapb :: Region > { &self.regions } -#[inline] pub fn mut_regions(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Region > { &mut self.regions } -#[inline] pub fn take_regions(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Region > { ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) } -#[inline] pub fn clear_start_index(&mut self) { self.start_index = 0 } -#[inline] pub fn set_start_index(&mut self, v: u64) { self.start_index = v; } -#[inline] pub fn get_start_index(&self) -> u64 { self.start_index } -} -impl ::protobuf::Clear for SyncRegionResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SyncRegionResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SyncRegionResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: SyncRegionResponse = SyncRegionResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SyncRegionResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_regions(&mut self) { + self.regions.clear(); + } + #[inline] + pub fn set_regions(&mut self, v: ::std::vec::Vec) { + self.regions = v; + } + #[inline] + pub fn get_regions(&self) -> &::std::vec::Vec { + &self.regions + } + #[inline] + pub fn mut_regions(&mut self) -> &mut ::std::vec::Vec { + &mut self.regions + } + #[inline] + pub fn take_regions(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_start_index(&mut self) { + self.start_index = 0 + } + #[inline] + pub fn set_start_index(&mut self, v: u64) { + self.start_index = v; + } + #[inline] + pub fn get_start_index(&self) -> u64 { + self.start_index + } +} +impl ::protobuf::Clear for SyncRegionResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SyncRegionResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SyncRegionResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: SyncRegionResponse = SyncRegionResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetOperatorRequest { -pub fn new_() -> GetOperatorRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RequestHeader { self.header.take().unwrap_or_else(RequestHeader::default) } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -} -impl ::protobuf::Clear for GetOperatorRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetOperatorRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetOperatorRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetOperatorRequest = GetOperatorRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetOperatorRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RequestHeader { + self.header.take().unwrap_or_else(RequestHeader::default) + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } +} +impl ::protobuf::Clear for GetOperatorRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetOperatorRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetOperatorRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetOperatorRequest = GetOperatorRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetOperatorResponse { -pub fn new_() -> GetOperatorResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: ResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &ResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut ResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(ResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> ResponseHeader { self.header.take().unwrap_or_else(ResponseHeader::default) } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn clear_desc(&mut self) { self.desc.clear(); } -#[inline] pub fn set_desc(&mut self, v: std :: vec :: Vec < u8 >) { self.desc = v; } -#[inline] pub fn get_desc(&self) -> &[u8] { &self.desc } -#[inline] pub fn mut_desc(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.desc } -#[inline] pub fn take_desc(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.desc, ::std::vec::Vec::new()) } -#[inline] pub fn clear_status(&mut self) { self.status = 0 } -#[inline] pub fn set_status_(&mut self, v: OperatorStatus) { self.status = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_status(&self) -> OperatorStatus { unsafe { ::std::mem::transmute::(self.status) } } -#[inline] pub fn clear_kind(&mut self) { self.kind.clear(); } -#[inline] pub fn set_kind(&mut self, v: std :: vec :: Vec < u8 >) { self.kind = v; } -#[inline] pub fn get_kind(&self) -> &[u8] { &self.kind } -#[inline] pub fn mut_kind(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.kind } -#[inline] pub fn take_kind(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.kind, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetOperatorResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetOperatorResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetOperatorResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetOperatorResponse = GetOperatorResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetOperatorResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: ResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &ResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut ResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(ResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> ResponseHeader { + self.header.take().unwrap_or_else(ResponseHeader::default) + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn clear_desc(&mut self) { + self.desc.clear(); + } + #[inline] + pub fn set_desc(&mut self, v: std::vec::Vec) { + self.desc = v; + } + #[inline] + pub fn get_desc(&self) -> &[u8] { + &self.desc + } + #[inline] + pub fn mut_desc(&mut self) -> &mut std::vec::Vec { + &mut self.desc + } + #[inline] + pub fn take_desc(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.desc, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_status(&mut self) { + self.status = 0 + } + #[inline] + pub fn set_status_(&mut self, v: OperatorStatus) { + self.status = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_status(&self) -> OperatorStatus { + unsafe { ::std::mem::transmute::(self.status) } + } + #[inline] + pub fn clear_kind(&mut self) { + self.kind.clear(); + } + #[inline] + pub fn set_kind(&mut self, v: std::vec::Vec) { + self.kind = v; + } + #[inline] + pub fn get_kind(&self) -> &[u8] { + &self.kind + } + #[inline] + pub fn mut_kind(&mut self) -> &mut std::vec::Vec { + &mut self.kind + } + #[inline] + pub fn take_kind(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.kind, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetOperatorResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetOperatorResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetOperatorResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetOperatorResponse = GetOperatorResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ErrorType { -pub fn values() -> &'static [Self] { -static VALUES: &'static [ErrorType] = &[ -ErrorType::Ok, -ErrorType::Unknown, -ErrorType::NotBootstrapped, -ErrorType::StoreTombstone, -ErrorType::AlreadyBootstrapped, -ErrorType::IncompatibleVersion, -ErrorType::RegionNotFound, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [ErrorType] = &[ + ErrorType::Ok, + ErrorType::Unknown, + ErrorType::NotBootstrapped, + ErrorType::StoreTombstone, + ErrorType::AlreadyBootstrapped, + ErrorType::IncompatibleVersion, + ErrorType::RegionNotFound, + ]; + VALUES + } } impl CheckPolicy { -pub fn values() -> &'static [Self] { -static VALUES: &'static [CheckPolicy] = &[ -CheckPolicy::Scan, -CheckPolicy::Approximate, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [CheckPolicy] = &[CheckPolicy::Scan, CheckPolicy::Approximate]; + VALUES + } } impl OperatorStatus { -pub fn values() -> &'static [Self] { -static VALUES: &'static [OperatorStatus] = &[ -OperatorStatus::Success, -OperatorStatus::Timeout, -OperatorStatus::Cancel, -OperatorStatus::Replace, -OperatorStatus::Running, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [OperatorStatus] = &[ + OperatorStatus::Success, + OperatorStatus::Timeout, + OperatorStatus::Cancel, + OperatorStatus::Replace, + OperatorStatus::Running, + ]; + VALUES + } } diff --git a/src/prost/wrapper_raft_cmdpb.rs b/src/prost/wrapper_raft_cmdpb.rs index 5a4b113b1..834c1c89b 100644 --- a/src/prost/wrapper_raft_cmdpb.rs +++ b/src/prost/wrapper_raft_cmdpb.rs @@ -1,2623 +1,6079 @@ // Generated file, please don't edit manually. impl GetRequest { -pub fn new_() -> GetRequest { ::std::default::Default::default() } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetRequest = GetRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetRequest = GetRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl GetResponse { -pub fn new_() -> GetResponse { ::std::default::Default::default() } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for GetResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for GetResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static GetResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: GetResponse = GetResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> GetResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for GetResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for GetResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static GetResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: GetResponse = GetResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PutRequest { -pub fn new_() -> PutRequest { ::std::default::Default::default() } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for PutRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PutRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PutRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PutRequest = PutRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PutRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for PutRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PutRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PutRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PutRequest = PutRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PutResponse { -pub fn new_() -> PutResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for PutResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PutResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PutResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PutResponse = PutResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PutResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for PutResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PutResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PutResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PutResponse = PutResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeleteRequest { -pub fn new_() -> DeleteRequest { ::std::default::Default::default() } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for DeleteRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeleteRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeleteRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeleteRequest = DeleteRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> DeleteRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for DeleteRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeleteRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeleteRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeleteRequest = DeleteRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeleteResponse { -pub fn new_() -> DeleteResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for DeleteResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeleteResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeleteResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeleteResponse = DeleteResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> DeleteResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for DeleteResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeleteResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeleteResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeleteResponse = DeleteResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeleteRangeRequest { -pub fn new_() -> DeleteRangeRequest { ::std::default::Default::default() } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_notify_only(&mut self) { self.notify_only = false } -#[inline] pub fn set_notify_only(&mut self, v: bool) { self.notify_only = v; } -#[inline] pub fn get_notify_only(&self) -> bool { self.notify_only } -} -impl ::protobuf::Clear for DeleteRangeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeleteRangeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeleteRangeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeleteRangeRequest = DeleteRangeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> DeleteRangeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_notify_only(&mut self) { + self.notify_only = false + } + #[inline] + pub fn set_notify_only(&mut self, v: bool) { + self.notify_only = v; + } + #[inline] + pub fn get_notify_only(&self) -> bool { + self.notify_only + } +} +impl ::protobuf::Clear for DeleteRangeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeleteRangeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeleteRangeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeleteRangeRequest = DeleteRangeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl DeleteRangeResponse { -pub fn new_() -> DeleteRangeResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for DeleteRangeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for DeleteRangeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static DeleteRangeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: DeleteRangeResponse = DeleteRangeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> DeleteRangeResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for DeleteRangeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for DeleteRangeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static DeleteRangeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: DeleteRangeResponse = DeleteRangeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SnapRequest { -pub fn new_() -> SnapRequest { ::std::default::Default::default() } -} -impl ::protobuf::Clear for SnapRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SnapRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapRequest = SnapRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SnapRequest { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for SnapRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SnapRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapRequest = SnapRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SnapResponse { -pub fn new_() -> SnapResponse { ::std::default::Default::default() } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for SnapResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SnapResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapResponse = SnapResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SnapResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for SnapResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SnapResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapResponse = SnapResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PrewriteRequest { -pub fn new_() -> PrewriteRequest { ::std::default::Default::default() } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -#[inline] pub fn clear_lock(&mut self) { self.lock.clear(); } -#[inline] pub fn set_lock(&mut self, v: std :: vec :: Vec < u8 >) { self.lock = v; } -#[inline] pub fn get_lock(&self) -> &[u8] { &self.lock } -#[inline] pub fn mut_lock(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.lock } -#[inline] pub fn take_lock(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.lock, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for PrewriteRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PrewriteRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PrewriteRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PrewriteRequest = PrewriteRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PrewriteRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_lock(&mut self) { + self.lock.clear(); + } + #[inline] + pub fn set_lock(&mut self, v: std::vec::Vec) { + self.lock = v; + } + #[inline] + pub fn get_lock(&self) -> &[u8] { + &self.lock + } + #[inline] + pub fn mut_lock(&mut self) -> &mut std::vec::Vec { + &mut self.lock + } + #[inline] + pub fn take_lock(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.lock, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for PrewriteRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PrewriteRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PrewriteRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PrewriteRequest = PrewriteRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PrewriteResponse { -pub fn new_() -> PrewriteResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for PrewriteResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PrewriteResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PrewriteResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PrewriteResponse = PrewriteResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PrewriteResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for PrewriteResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PrewriteResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PrewriteResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PrewriteResponse = PrewriteResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl IngestSstRequest { -pub fn new_() -> IngestSstRequest { ::std::default::Default::default() } -#[inline] pub fn has_sst(&self) -> bool { self.sst.is_some() } -#[inline] pub fn clear_sst(&mut self) { self.sst = ::std::option::Option::None } -#[inline] pub fn set_sst(&mut self, v: super :: import_sstpb :: SstMeta) { self.sst = ::std::option::Option::Some(v); } -#[inline] pub fn get_sst(&self) -> &super :: import_sstpb :: SstMeta { match self.sst.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_sst(&mut self) -> &mut super :: import_sstpb :: SstMeta { if self.sst.is_none() { - self.sst = ::std::option::Option::Some(super :: import_sstpb :: SstMeta::default()); - } - self.sst.as_mut().unwrap() } -#[inline] pub fn take_sst(&mut self) -> super :: import_sstpb :: SstMeta { self.sst.take().unwrap_or_else(super :: import_sstpb :: SstMeta::default) } -} -impl ::protobuf::Clear for IngestSstRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for IngestSstRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static IngestSstRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: IngestSstRequest = IngestSstRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> IngestSstRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_sst(&self) -> bool { + self.sst.is_some() + } + #[inline] + pub fn clear_sst(&mut self) { + self.sst = ::std::option::Option::None + } + #[inline] + pub fn set_sst(&mut self, v: super::import_sstpb::SstMeta) { + self.sst = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_sst(&self) -> &super::import_sstpb::SstMeta { + match self.sst.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_sst(&mut self) -> &mut super::import_sstpb::SstMeta { + if self.sst.is_none() { + self.sst = ::std::option::Option::Some(super::import_sstpb::SstMeta::default()); + } + self.sst.as_mut().unwrap() + } + #[inline] + pub fn take_sst(&mut self) -> super::import_sstpb::SstMeta { + self.sst + .take() + .unwrap_or_else(super::import_sstpb::SstMeta::default) + } +} +impl ::protobuf::Clear for IngestSstRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for IngestSstRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static IngestSstRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: IngestSstRequest = IngestSstRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl IngestSstResponse { -pub fn new_() -> IngestSstResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for IngestSstResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for IngestSstResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static IngestSstResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: IngestSstResponse = IngestSstResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> IngestSstResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for IngestSstResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for IngestSstResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static IngestSstResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: IngestSstResponse = IngestSstResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReadIndexRequest { -pub fn new_() -> ReadIndexRequest { ::std::default::Default::default() } -} -impl ::protobuf::Clear for ReadIndexRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReadIndexRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReadIndexRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReadIndexRequest = ReadIndexRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReadIndexRequest { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for ReadIndexRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReadIndexRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReadIndexRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReadIndexRequest = ReadIndexRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ReadIndexResponse { -pub fn new_() -> ReadIndexResponse { ::std::default::Default::default() } -#[inline] pub fn clear_read_index(&mut self) { self.read_index = 0 } -#[inline] pub fn set_read_index(&mut self, v: u64) { self.read_index = v; } -#[inline] pub fn get_read_index(&self) -> u64 { self.read_index } -} -impl ::protobuf::Clear for ReadIndexResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ReadIndexResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ReadIndexResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ReadIndexResponse = ReadIndexResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ReadIndexResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_read_index(&mut self) { + self.read_index = 0 + } + #[inline] + pub fn set_read_index(&mut self, v: u64) { + self.read_index = v; + } + #[inline] + pub fn get_read_index(&self) -> u64 { + self.read_index + } +} +impl ::protobuf::Clear for ReadIndexResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ReadIndexResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ReadIndexResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ReadIndexResponse = ReadIndexResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Request { -pub fn new_() -> Request { ::std::default::Default::default() } -#[inline] pub fn clear_cmd_type(&mut self) { self.cmd_type = 0 } -#[inline] pub fn set_cmd_type_(&mut self, v: CmdType) { self.cmd_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_cmd_type(&self) -> CmdType { unsafe { ::std::mem::transmute::(self.cmd_type) } } -#[inline] pub fn has_get(&self) -> bool { self.get.is_some() } -#[inline] pub fn clear_get(&mut self) { self.get = ::std::option::Option::None } -#[inline] pub fn set_get(&mut self, v: GetRequest) { self.get = ::std::option::Option::Some(v); } -#[inline] pub fn get_get(&self) -> &GetRequest { match self.get.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_get(&mut self) -> &mut GetRequest { if self.get.is_none() { - self.get = ::std::option::Option::Some(GetRequest::default()); - } - self.get.as_mut().unwrap() } -#[inline] pub fn take_get(&mut self) -> GetRequest { self.get.take().unwrap_or_else(GetRequest::default) } -#[inline] pub fn has_put(&self) -> bool { self.put.is_some() } -#[inline] pub fn clear_put(&mut self) { self.put = ::std::option::Option::None } -#[inline] pub fn set_put(&mut self, v: PutRequest) { self.put = ::std::option::Option::Some(v); } -#[inline] pub fn get_put(&self) -> &PutRequest { match self.put.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_put(&mut self) -> &mut PutRequest { if self.put.is_none() { - self.put = ::std::option::Option::Some(PutRequest::default()); - } - self.put.as_mut().unwrap() } -#[inline] pub fn take_put(&mut self) -> PutRequest { self.put.take().unwrap_or_else(PutRequest::default) } -#[inline] pub fn has_delete(&self) -> bool { self.delete.is_some() } -#[inline] pub fn clear_delete(&mut self) { self.delete = ::std::option::Option::None } -#[inline] pub fn set_delete(&mut self, v: DeleteRequest) { self.delete = ::std::option::Option::Some(v); } -#[inline] pub fn get_delete(&self) -> &DeleteRequest { match self.delete.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_delete(&mut self) -> &mut DeleteRequest { if self.delete.is_none() { - self.delete = ::std::option::Option::Some(DeleteRequest::default()); - } - self.delete.as_mut().unwrap() } -#[inline] pub fn take_delete(&mut self) -> DeleteRequest { self.delete.take().unwrap_or_else(DeleteRequest::default) } -#[inline] pub fn has_snap(&self) -> bool { self.snap.is_some() } -#[inline] pub fn clear_snap(&mut self) { self.snap = ::std::option::Option::None } -#[inline] pub fn set_snap(&mut self, v: SnapRequest) { self.snap = ::std::option::Option::Some(v); } -#[inline] pub fn get_snap(&self) -> &SnapRequest { match self.snap.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_snap(&mut self) -> &mut SnapRequest { if self.snap.is_none() { - self.snap = ::std::option::Option::Some(SnapRequest::default()); - } - self.snap.as_mut().unwrap() } -#[inline] pub fn take_snap(&mut self) -> SnapRequest { self.snap.take().unwrap_or_else(SnapRequest::default) } -#[inline] pub fn has_prewrite(&self) -> bool { self.prewrite.is_some() } -#[inline] pub fn clear_prewrite(&mut self) { self.prewrite = ::std::option::Option::None } -#[inline] pub fn set_prewrite(&mut self, v: PrewriteRequest) { self.prewrite = ::std::option::Option::Some(v); } -#[inline] pub fn get_prewrite(&self) -> &PrewriteRequest { match self.prewrite.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_prewrite(&mut self) -> &mut PrewriteRequest { if self.prewrite.is_none() { - self.prewrite = ::std::option::Option::Some(PrewriteRequest::default()); - } - self.prewrite.as_mut().unwrap() } -#[inline] pub fn take_prewrite(&mut self) -> PrewriteRequest { self.prewrite.take().unwrap_or_else(PrewriteRequest::default) } -#[inline] pub fn has_delete_range(&self) -> bool { self.delete_range.is_some() } -#[inline] pub fn clear_delete_range(&mut self) { self.delete_range = ::std::option::Option::None } -#[inline] pub fn set_delete_range(&mut self, v: DeleteRangeRequest) { self.delete_range = ::std::option::Option::Some(v); } -#[inline] pub fn get_delete_range(&self) -> &DeleteRangeRequest { match self.delete_range.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_delete_range(&mut self) -> &mut DeleteRangeRequest { if self.delete_range.is_none() { - self.delete_range = ::std::option::Option::Some(DeleteRangeRequest::default()); - } - self.delete_range.as_mut().unwrap() } -#[inline] pub fn take_delete_range(&mut self) -> DeleteRangeRequest { self.delete_range.take().unwrap_or_else(DeleteRangeRequest::default) } -#[inline] pub fn has_ingest_sst(&self) -> bool { self.ingest_sst.is_some() } -#[inline] pub fn clear_ingest_sst(&mut self) { self.ingest_sst = ::std::option::Option::None } -#[inline] pub fn set_ingest_sst(&mut self, v: IngestSstRequest) { self.ingest_sst = ::std::option::Option::Some(v); } -#[inline] pub fn get_ingest_sst(&self) -> &IngestSstRequest { match self.ingest_sst.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_ingest_sst(&mut self) -> &mut IngestSstRequest { if self.ingest_sst.is_none() { - self.ingest_sst = ::std::option::Option::Some(IngestSstRequest::default()); - } - self.ingest_sst.as_mut().unwrap() } -#[inline] pub fn take_ingest_sst(&mut self) -> IngestSstRequest { self.ingest_sst.take().unwrap_or_else(IngestSstRequest::default) } -#[inline] pub fn has_read_index(&self) -> bool { self.read_index.is_some() } -#[inline] pub fn clear_read_index(&mut self) { self.read_index = ::std::option::Option::None } -#[inline] pub fn set_read_index(&mut self, v: ReadIndexRequest) { self.read_index = ::std::option::Option::Some(v); } -#[inline] pub fn get_read_index(&self) -> &ReadIndexRequest { match self.read_index.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_read_index(&mut self) -> &mut ReadIndexRequest { if self.read_index.is_none() { - self.read_index = ::std::option::Option::Some(ReadIndexRequest::default()); - } - self.read_index.as_mut().unwrap() } -#[inline] pub fn take_read_index(&mut self) -> ReadIndexRequest { self.read_index.take().unwrap_or_else(ReadIndexRequest::default) } -} -impl ::protobuf::Clear for Request {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Request {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Request { - ::lazy_static::lazy_static! { - static ref INSTANCE: Request = Request::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Request { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cmd_type(&mut self) { + self.cmd_type = 0 + } + #[inline] + pub fn set_cmd_type_(&mut self, v: CmdType) { + self.cmd_type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_cmd_type(&self) -> CmdType { + unsafe { ::std::mem::transmute::(self.cmd_type) } + } + #[inline] + pub fn has_get(&self) -> bool { + self.get.is_some() + } + #[inline] + pub fn clear_get(&mut self) { + self.get = ::std::option::Option::None + } + #[inline] + pub fn set_get(&mut self, v: GetRequest) { + self.get = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_get(&self) -> &GetRequest { + match self.get.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_get(&mut self) -> &mut GetRequest { + if self.get.is_none() { + self.get = ::std::option::Option::Some(GetRequest::default()); + } + self.get.as_mut().unwrap() + } + #[inline] + pub fn take_get(&mut self) -> GetRequest { + self.get.take().unwrap_or_else(GetRequest::default) + } + #[inline] + pub fn has_put(&self) -> bool { + self.put.is_some() + } + #[inline] + pub fn clear_put(&mut self) { + self.put = ::std::option::Option::None + } + #[inline] + pub fn set_put(&mut self, v: PutRequest) { + self.put = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_put(&self) -> &PutRequest { + match self.put.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_put(&mut self) -> &mut PutRequest { + if self.put.is_none() { + self.put = ::std::option::Option::Some(PutRequest::default()); + } + self.put.as_mut().unwrap() + } + #[inline] + pub fn take_put(&mut self) -> PutRequest { + self.put.take().unwrap_or_else(PutRequest::default) + } + #[inline] + pub fn has_delete(&self) -> bool { + self.delete.is_some() + } + #[inline] + pub fn clear_delete(&mut self) { + self.delete = ::std::option::Option::None + } + #[inline] + pub fn set_delete(&mut self, v: DeleteRequest) { + self.delete = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_delete(&self) -> &DeleteRequest { + match self.delete.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_delete(&mut self) -> &mut DeleteRequest { + if self.delete.is_none() { + self.delete = ::std::option::Option::Some(DeleteRequest::default()); + } + self.delete.as_mut().unwrap() + } + #[inline] + pub fn take_delete(&mut self) -> DeleteRequest { + self.delete.take().unwrap_or_else(DeleteRequest::default) + } + #[inline] + pub fn has_snap(&self) -> bool { + self.snap.is_some() + } + #[inline] + pub fn clear_snap(&mut self) { + self.snap = ::std::option::Option::None + } + #[inline] + pub fn set_snap(&mut self, v: SnapRequest) { + self.snap = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_snap(&self) -> &SnapRequest { + match self.snap.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_snap(&mut self) -> &mut SnapRequest { + if self.snap.is_none() { + self.snap = ::std::option::Option::Some(SnapRequest::default()); + } + self.snap.as_mut().unwrap() + } + #[inline] + pub fn take_snap(&mut self) -> SnapRequest { + self.snap.take().unwrap_or_else(SnapRequest::default) + } + #[inline] + pub fn has_prewrite(&self) -> bool { + self.prewrite.is_some() + } + #[inline] + pub fn clear_prewrite(&mut self) { + self.prewrite = ::std::option::Option::None + } + #[inline] + pub fn set_prewrite(&mut self, v: PrewriteRequest) { + self.prewrite = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_prewrite(&self) -> &PrewriteRequest { + match self.prewrite.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_prewrite(&mut self) -> &mut PrewriteRequest { + if self.prewrite.is_none() { + self.prewrite = ::std::option::Option::Some(PrewriteRequest::default()); + } + self.prewrite.as_mut().unwrap() + } + #[inline] + pub fn take_prewrite(&mut self) -> PrewriteRequest { + self.prewrite + .take() + .unwrap_or_else(PrewriteRequest::default) + } + #[inline] + pub fn has_delete_range(&self) -> bool { + self.delete_range.is_some() + } + #[inline] + pub fn clear_delete_range(&mut self) { + self.delete_range = ::std::option::Option::None + } + #[inline] + pub fn set_delete_range(&mut self, v: DeleteRangeRequest) { + self.delete_range = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_delete_range(&self) -> &DeleteRangeRequest { + match self.delete_range.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_delete_range(&mut self) -> &mut DeleteRangeRequest { + if self.delete_range.is_none() { + self.delete_range = ::std::option::Option::Some(DeleteRangeRequest::default()); + } + self.delete_range.as_mut().unwrap() + } + #[inline] + pub fn take_delete_range(&mut self) -> DeleteRangeRequest { + self.delete_range + .take() + .unwrap_or_else(DeleteRangeRequest::default) + } + #[inline] + pub fn has_ingest_sst(&self) -> bool { + self.ingest_sst.is_some() + } + #[inline] + pub fn clear_ingest_sst(&mut self) { + self.ingest_sst = ::std::option::Option::None + } + #[inline] + pub fn set_ingest_sst(&mut self, v: IngestSstRequest) { + self.ingest_sst = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_ingest_sst(&self) -> &IngestSstRequest { + match self.ingest_sst.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_ingest_sst(&mut self) -> &mut IngestSstRequest { + if self.ingest_sst.is_none() { + self.ingest_sst = ::std::option::Option::Some(IngestSstRequest::default()); + } + self.ingest_sst.as_mut().unwrap() + } + #[inline] + pub fn take_ingest_sst(&mut self) -> IngestSstRequest { + self.ingest_sst + .take() + .unwrap_or_else(IngestSstRequest::default) + } + #[inline] + pub fn has_read_index(&self) -> bool { + self.read_index.is_some() + } + #[inline] + pub fn clear_read_index(&mut self) { + self.read_index = ::std::option::Option::None + } + #[inline] + pub fn set_read_index(&mut self, v: ReadIndexRequest) { + self.read_index = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_read_index(&self) -> &ReadIndexRequest { + match self.read_index.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_read_index(&mut self) -> &mut ReadIndexRequest { + if self.read_index.is_none() { + self.read_index = ::std::option::Option::Some(ReadIndexRequest::default()); + } + self.read_index.as_mut().unwrap() + } + #[inline] + pub fn take_read_index(&mut self) -> ReadIndexRequest { + self.read_index + .take() + .unwrap_or_else(ReadIndexRequest::default) + } +} +impl ::protobuf::Clear for Request { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Request { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Request { + ::lazy_static::lazy_static! { + static ref INSTANCE: Request = Request::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Response { -pub fn new_() -> Response { ::std::default::Default::default() } -#[inline] pub fn clear_cmd_type(&mut self) { self.cmd_type = 0 } -#[inline] pub fn set_cmd_type_(&mut self, v: CmdType) { self.cmd_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_cmd_type(&self) -> CmdType { unsafe { ::std::mem::transmute::(self.cmd_type) } } -#[inline] pub fn has_get(&self) -> bool { self.get.is_some() } -#[inline] pub fn clear_get(&mut self) { self.get = ::std::option::Option::None } -#[inline] pub fn set_get(&mut self, v: GetResponse) { self.get = ::std::option::Option::Some(v); } -#[inline] pub fn get_get(&self) -> &GetResponse { match self.get.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_get(&mut self) -> &mut GetResponse { if self.get.is_none() { - self.get = ::std::option::Option::Some(GetResponse::default()); - } - self.get.as_mut().unwrap() } -#[inline] pub fn take_get(&mut self) -> GetResponse { self.get.take().unwrap_or_else(GetResponse::default) } -#[inline] pub fn has_put(&self) -> bool { self.put.is_some() } -#[inline] pub fn clear_put(&mut self) { self.put = ::std::option::Option::None } -#[inline] pub fn set_put(&mut self, v: PutResponse) { self.put = ::std::option::Option::Some(v); } -#[inline] pub fn get_put(&self) -> &PutResponse { match self.put.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_put(&mut self) -> &mut PutResponse { if self.put.is_none() { - self.put = ::std::option::Option::Some(PutResponse::default()); - } - self.put.as_mut().unwrap() } -#[inline] pub fn take_put(&mut self) -> PutResponse { self.put.take().unwrap_or_else(PutResponse::default) } -#[inline] pub fn has_delete(&self) -> bool { self.delete.is_some() } -#[inline] pub fn clear_delete(&mut self) { self.delete = ::std::option::Option::None } -#[inline] pub fn set_delete(&mut self, v: DeleteResponse) { self.delete = ::std::option::Option::Some(v); } -#[inline] pub fn get_delete(&self) -> &DeleteResponse { match self.delete.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_delete(&mut self) -> &mut DeleteResponse { if self.delete.is_none() { - self.delete = ::std::option::Option::Some(DeleteResponse::default()); - } - self.delete.as_mut().unwrap() } -#[inline] pub fn take_delete(&mut self) -> DeleteResponse { self.delete.take().unwrap_or_else(DeleteResponse::default) } -#[inline] pub fn has_snap(&self) -> bool { self.snap.is_some() } -#[inline] pub fn clear_snap(&mut self) { self.snap = ::std::option::Option::None } -#[inline] pub fn set_snap(&mut self, v: SnapResponse) { self.snap = ::std::option::Option::Some(v); } -#[inline] pub fn get_snap(&self) -> &SnapResponse { match self.snap.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_snap(&mut self) -> &mut SnapResponse { if self.snap.is_none() { - self.snap = ::std::option::Option::Some(SnapResponse::default()); - } - self.snap.as_mut().unwrap() } -#[inline] pub fn take_snap(&mut self) -> SnapResponse { self.snap.take().unwrap_or_else(SnapResponse::default) } -#[inline] pub fn has_prewrite(&self) -> bool { self.prewrite.is_some() } -#[inline] pub fn clear_prewrite(&mut self) { self.prewrite = ::std::option::Option::None } -#[inline] pub fn set_prewrite(&mut self, v: PrewriteResponse) { self.prewrite = ::std::option::Option::Some(v); } -#[inline] pub fn get_prewrite(&self) -> &PrewriteResponse { match self.prewrite.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_prewrite(&mut self) -> &mut PrewriteResponse { if self.prewrite.is_none() { - self.prewrite = ::std::option::Option::Some(PrewriteResponse::default()); - } - self.prewrite.as_mut().unwrap() } -#[inline] pub fn take_prewrite(&mut self) -> PrewriteResponse { self.prewrite.take().unwrap_or_else(PrewriteResponse::default) } -#[inline] pub fn has_delte_range(&self) -> bool { self.delte_range.is_some() } -#[inline] pub fn clear_delte_range(&mut self) { self.delte_range = ::std::option::Option::None } -#[inline] pub fn set_delte_range(&mut self, v: DeleteRangeResponse) { self.delte_range = ::std::option::Option::Some(v); } -#[inline] pub fn get_delte_range(&self) -> &DeleteRangeResponse { match self.delte_range.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_delte_range(&mut self) -> &mut DeleteRangeResponse { if self.delte_range.is_none() { - self.delte_range = ::std::option::Option::Some(DeleteRangeResponse::default()); - } - self.delte_range.as_mut().unwrap() } -#[inline] pub fn take_delte_range(&mut self) -> DeleteRangeResponse { self.delte_range.take().unwrap_or_else(DeleteRangeResponse::default) } -#[inline] pub fn has_ingest_sst(&self) -> bool { self.ingest_sst.is_some() } -#[inline] pub fn clear_ingest_sst(&mut self) { self.ingest_sst = ::std::option::Option::None } -#[inline] pub fn set_ingest_sst(&mut self, v: IngestSstResponse) { self.ingest_sst = ::std::option::Option::Some(v); } -#[inline] pub fn get_ingest_sst(&self) -> &IngestSstResponse { match self.ingest_sst.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_ingest_sst(&mut self) -> &mut IngestSstResponse { if self.ingest_sst.is_none() { - self.ingest_sst = ::std::option::Option::Some(IngestSstResponse::default()); - } - self.ingest_sst.as_mut().unwrap() } -#[inline] pub fn take_ingest_sst(&mut self) -> IngestSstResponse { self.ingest_sst.take().unwrap_or_else(IngestSstResponse::default) } -#[inline] pub fn has_read_index(&self) -> bool { self.read_index.is_some() } -#[inline] pub fn clear_read_index(&mut self) { self.read_index = ::std::option::Option::None } -#[inline] pub fn set_read_index(&mut self, v: ReadIndexResponse) { self.read_index = ::std::option::Option::Some(v); } -#[inline] pub fn get_read_index(&self) -> &ReadIndexResponse { match self.read_index.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_read_index(&mut self) -> &mut ReadIndexResponse { if self.read_index.is_none() { - self.read_index = ::std::option::Option::Some(ReadIndexResponse::default()); - } - self.read_index.as_mut().unwrap() } -#[inline] pub fn take_read_index(&mut self) -> ReadIndexResponse { self.read_index.take().unwrap_or_else(ReadIndexResponse::default) } -} -impl ::protobuf::Clear for Response {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Response {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Response { - ::lazy_static::lazy_static! { - static ref INSTANCE: Response = Response::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> Response { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cmd_type(&mut self) { + self.cmd_type = 0 + } + #[inline] + pub fn set_cmd_type_(&mut self, v: CmdType) { + self.cmd_type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_cmd_type(&self) -> CmdType { + unsafe { ::std::mem::transmute::(self.cmd_type) } + } + #[inline] + pub fn has_get(&self) -> bool { + self.get.is_some() + } + #[inline] + pub fn clear_get(&mut self) { + self.get = ::std::option::Option::None + } + #[inline] + pub fn set_get(&mut self, v: GetResponse) { + self.get = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_get(&self) -> &GetResponse { + match self.get.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_get(&mut self) -> &mut GetResponse { + if self.get.is_none() { + self.get = ::std::option::Option::Some(GetResponse::default()); + } + self.get.as_mut().unwrap() + } + #[inline] + pub fn take_get(&mut self) -> GetResponse { + self.get.take().unwrap_or_else(GetResponse::default) + } + #[inline] + pub fn has_put(&self) -> bool { + self.put.is_some() + } + #[inline] + pub fn clear_put(&mut self) { + self.put = ::std::option::Option::None + } + #[inline] + pub fn set_put(&mut self, v: PutResponse) { + self.put = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_put(&self) -> &PutResponse { + match self.put.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_put(&mut self) -> &mut PutResponse { + if self.put.is_none() { + self.put = ::std::option::Option::Some(PutResponse::default()); + } + self.put.as_mut().unwrap() + } + #[inline] + pub fn take_put(&mut self) -> PutResponse { + self.put.take().unwrap_or_else(PutResponse::default) + } + #[inline] + pub fn has_delete(&self) -> bool { + self.delete.is_some() + } + #[inline] + pub fn clear_delete(&mut self) { + self.delete = ::std::option::Option::None + } + #[inline] + pub fn set_delete(&mut self, v: DeleteResponse) { + self.delete = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_delete(&self) -> &DeleteResponse { + match self.delete.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_delete(&mut self) -> &mut DeleteResponse { + if self.delete.is_none() { + self.delete = ::std::option::Option::Some(DeleteResponse::default()); + } + self.delete.as_mut().unwrap() + } + #[inline] + pub fn take_delete(&mut self) -> DeleteResponse { + self.delete.take().unwrap_or_else(DeleteResponse::default) + } + #[inline] + pub fn has_snap(&self) -> bool { + self.snap.is_some() + } + #[inline] + pub fn clear_snap(&mut self) { + self.snap = ::std::option::Option::None + } + #[inline] + pub fn set_snap(&mut self, v: SnapResponse) { + self.snap = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_snap(&self) -> &SnapResponse { + match self.snap.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_snap(&mut self) -> &mut SnapResponse { + if self.snap.is_none() { + self.snap = ::std::option::Option::Some(SnapResponse::default()); + } + self.snap.as_mut().unwrap() + } + #[inline] + pub fn take_snap(&mut self) -> SnapResponse { + self.snap.take().unwrap_or_else(SnapResponse::default) + } + #[inline] + pub fn has_prewrite(&self) -> bool { + self.prewrite.is_some() + } + #[inline] + pub fn clear_prewrite(&mut self) { + self.prewrite = ::std::option::Option::None + } + #[inline] + pub fn set_prewrite(&mut self, v: PrewriteResponse) { + self.prewrite = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_prewrite(&self) -> &PrewriteResponse { + match self.prewrite.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_prewrite(&mut self) -> &mut PrewriteResponse { + if self.prewrite.is_none() { + self.prewrite = ::std::option::Option::Some(PrewriteResponse::default()); + } + self.prewrite.as_mut().unwrap() + } + #[inline] + pub fn take_prewrite(&mut self) -> PrewriteResponse { + self.prewrite + .take() + .unwrap_or_else(PrewriteResponse::default) + } + #[inline] + pub fn has_delte_range(&self) -> bool { + self.delte_range.is_some() + } + #[inline] + pub fn clear_delte_range(&mut self) { + self.delte_range = ::std::option::Option::None + } + #[inline] + pub fn set_delte_range(&mut self, v: DeleteRangeResponse) { + self.delte_range = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_delte_range(&self) -> &DeleteRangeResponse { + match self.delte_range.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_delte_range(&mut self) -> &mut DeleteRangeResponse { + if self.delte_range.is_none() { + self.delte_range = ::std::option::Option::Some(DeleteRangeResponse::default()); + } + self.delte_range.as_mut().unwrap() + } + #[inline] + pub fn take_delte_range(&mut self) -> DeleteRangeResponse { + self.delte_range + .take() + .unwrap_or_else(DeleteRangeResponse::default) + } + #[inline] + pub fn has_ingest_sst(&self) -> bool { + self.ingest_sst.is_some() + } + #[inline] + pub fn clear_ingest_sst(&mut self) { + self.ingest_sst = ::std::option::Option::None + } + #[inline] + pub fn set_ingest_sst(&mut self, v: IngestSstResponse) { + self.ingest_sst = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_ingest_sst(&self) -> &IngestSstResponse { + match self.ingest_sst.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_ingest_sst(&mut self) -> &mut IngestSstResponse { + if self.ingest_sst.is_none() { + self.ingest_sst = ::std::option::Option::Some(IngestSstResponse::default()); + } + self.ingest_sst.as_mut().unwrap() + } + #[inline] + pub fn take_ingest_sst(&mut self) -> IngestSstResponse { + self.ingest_sst + .take() + .unwrap_or_else(IngestSstResponse::default) + } + #[inline] + pub fn has_read_index(&self) -> bool { + self.read_index.is_some() + } + #[inline] + pub fn clear_read_index(&mut self) { + self.read_index = ::std::option::Option::None + } + #[inline] + pub fn set_read_index(&mut self, v: ReadIndexResponse) { + self.read_index = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_read_index(&self) -> &ReadIndexResponse { + match self.read_index.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_read_index(&mut self) -> &mut ReadIndexResponse { + if self.read_index.is_none() { + self.read_index = ::std::option::Option::Some(ReadIndexResponse::default()); + } + self.read_index.as_mut().unwrap() + } + #[inline] + pub fn take_read_index(&mut self) -> ReadIndexResponse { + self.read_index + .take() + .unwrap_or_else(ReadIndexResponse::default) + } +} +impl ::protobuf::Clear for Response { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Response { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Response { + ::lazy_static::lazy_static! { + static ref INSTANCE: Response = Response::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ChangePeerRequest { -pub fn new_() -> ChangePeerRequest { ::std::default::Default::default() } -#[inline] pub fn clear_change_type(&mut self) { self.change_type = 0 } -#[inline] pub fn set_change_type_(&mut self, v: super::eraftpb::ConfChangeType) { self.change_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_change_type(&self) -> super::eraftpb::ConfChangeType { unsafe { ::std::mem::transmute::(self.change_type) } } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -} -impl ::protobuf::Clear for ChangePeerRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ChangePeerRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ChangePeerRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: ChangePeerRequest = ChangePeerRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ChangePeerRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_change_type(&mut self) { + self.change_type = 0 + } + #[inline] + pub fn set_change_type_(&mut self, v: super::eraftpb::ConfChangeType) { + self.change_type = + unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_change_type(&self) -> super::eraftpb::ConfChangeType { + unsafe { ::std::mem::transmute::(self.change_type) } + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } +} +impl ::protobuf::Clear for ChangePeerRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ChangePeerRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ChangePeerRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: ChangePeerRequest = ChangePeerRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl ChangePeerResponse { -pub fn new_() -> ChangePeerResponse { ::std::default::Default::default() } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for ChangePeerResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for ChangePeerResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static ChangePeerResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: ChangePeerResponse = ChangePeerResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> ChangePeerResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for ChangePeerResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for ChangePeerResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static ChangePeerResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: ChangePeerResponse = ChangePeerResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SplitRequest { -pub fn new_() -> SplitRequest { ::std::default::Default::default() } -#[inline] pub fn clear_split_key(&mut self) { self.split_key.clear(); } -#[inline] pub fn set_split_key(&mut self, v: std :: vec :: Vec < u8 >) { self.split_key = v; } -#[inline] pub fn get_split_key(&self) -> &[u8] { &self.split_key } -#[inline] pub fn mut_split_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.split_key } -#[inline] pub fn take_split_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.split_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_new_region_id(&mut self) { self.new_region_id = 0 } -#[inline] pub fn set_new_region_id(&mut self, v: u64) { self.new_region_id = v; } -#[inline] pub fn get_new_region_id(&self) -> u64 { self.new_region_id } -#[inline] pub fn clear_new_peer_ids(&mut self) { self.new_peer_ids.clear(); } -#[inline] pub fn set_new_peer_ids(&mut self, v: :: std :: vec :: Vec < u64 >) { self.new_peer_ids = v; } -#[inline] pub fn get_new_peer_ids(&self) -> &:: std :: vec :: Vec < u64 > { &self.new_peer_ids } -#[inline] pub fn mut_new_peer_ids(&mut self) -> &mut :: std :: vec :: Vec < u64 > { &mut self.new_peer_ids } -#[inline] pub fn take_new_peer_ids(&mut self) -> :: std :: vec :: Vec < u64 > { ::std::mem::replace(&mut self.new_peer_ids, ::std::vec::Vec::new()) } -#[inline] pub fn clear_right_derive(&mut self) { self.right_derive = false } -#[inline] pub fn set_right_derive(&mut self, v: bool) { self.right_derive = v; } -#[inline] pub fn get_right_derive(&self) -> bool { self.right_derive } -} -impl ::protobuf::Clear for SplitRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SplitRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SplitRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: SplitRequest = SplitRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SplitRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_split_key(&mut self) { + self.split_key.clear(); + } + #[inline] + pub fn set_split_key(&mut self, v: std::vec::Vec) { + self.split_key = v; + } + #[inline] + pub fn get_split_key(&self) -> &[u8] { + &self.split_key + } + #[inline] + pub fn mut_split_key(&mut self) -> &mut std::vec::Vec { + &mut self.split_key + } + #[inline] + pub fn take_split_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.split_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_new_region_id(&mut self) { + self.new_region_id = 0 + } + #[inline] + pub fn set_new_region_id(&mut self, v: u64) { + self.new_region_id = v; + } + #[inline] + pub fn get_new_region_id(&self) -> u64 { + self.new_region_id + } + #[inline] + pub fn clear_new_peer_ids(&mut self) { + self.new_peer_ids.clear(); + } + #[inline] + pub fn set_new_peer_ids(&mut self, v: ::std::vec::Vec) { + self.new_peer_ids = v; + } + #[inline] + pub fn get_new_peer_ids(&self) -> &::std::vec::Vec { + &self.new_peer_ids + } + #[inline] + pub fn mut_new_peer_ids(&mut self) -> &mut ::std::vec::Vec { + &mut self.new_peer_ids + } + #[inline] + pub fn take_new_peer_ids(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.new_peer_ids, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_right_derive(&mut self) { + self.right_derive = false + } + #[inline] + pub fn set_right_derive(&mut self, v: bool) { + self.right_derive = v; + } + #[inline] + pub fn get_right_derive(&self) -> bool { + self.right_derive + } +} +impl ::protobuf::Clear for SplitRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SplitRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SplitRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: SplitRequest = SplitRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SplitResponse { -pub fn new_() -> SplitResponse { ::std::default::Default::default() } -#[inline] pub fn has_left(&self) -> bool { self.left.is_some() } -#[inline] pub fn clear_left(&mut self) { self.left = ::std::option::Option::None } -#[inline] pub fn set_left(&mut self, v: super :: metapb :: Region) { self.left = ::std::option::Option::Some(v); } -#[inline] pub fn get_left(&self) -> &super :: metapb :: Region { match self.left.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_left(&mut self) -> &mut super :: metapb :: Region { if self.left.is_none() { - self.left = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.left.as_mut().unwrap() } -#[inline] pub fn take_left(&mut self) -> super :: metapb :: Region { self.left.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_right(&self) -> bool { self.right.is_some() } -#[inline] pub fn clear_right(&mut self) { self.right = ::std::option::Option::None } -#[inline] pub fn set_right(&mut self, v: super :: metapb :: Region) { self.right = ::std::option::Option::Some(v); } -#[inline] pub fn get_right(&self) -> &super :: metapb :: Region { match self.right.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_right(&mut self) -> &mut super :: metapb :: Region { if self.right.is_none() { - self.right = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.right.as_mut().unwrap() } -#[inline] pub fn take_right(&mut self) -> super :: metapb :: Region { self.right.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for SplitResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SplitResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SplitResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: SplitResponse = SplitResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> SplitResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_left(&self) -> bool { + self.left.is_some() + } + #[inline] + pub fn clear_left(&mut self) { + self.left = ::std::option::Option::None + } + #[inline] + pub fn set_left(&mut self, v: super::metapb::Region) { + self.left = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_left(&self) -> &super::metapb::Region { + match self.left.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_left(&mut self) -> &mut super::metapb::Region { + if self.left.is_none() { + self.left = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.left.as_mut().unwrap() + } + #[inline] + pub fn take_left(&mut self) -> super::metapb::Region { + self.left + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_right(&self) -> bool { + self.right.is_some() + } + #[inline] + pub fn clear_right(&mut self) { + self.right = ::std::option::Option::None + } + #[inline] + pub fn set_right(&mut self, v: super::metapb::Region) { + self.right = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_right(&self) -> &super::metapb::Region { + match self.right.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_right(&mut self) -> &mut super::metapb::Region { + if self.right.is_none() { + self.right = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.right.as_mut().unwrap() + } + #[inline] + pub fn take_right(&mut self) -> super::metapb::Region { + self.right + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for SplitResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SplitResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SplitResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: SplitResponse = SplitResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BatchSplitRequest { -pub fn new_() -> BatchSplitRequest { ::std::default::Default::default() } -#[inline] pub fn clear_requests(&mut self) { self.requests.clear(); } -#[inline] pub fn set_requests(&mut self, v: :: std :: vec :: Vec < SplitRequest >) { self.requests = v; } -#[inline] pub fn get_requests(&self) -> &:: std :: vec :: Vec < SplitRequest > { &self.requests } -#[inline] pub fn mut_requests(&mut self) -> &mut :: std :: vec :: Vec < SplitRequest > { &mut self.requests } -#[inline] pub fn take_requests(&mut self) -> :: std :: vec :: Vec < SplitRequest > { ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) } -#[inline] pub fn clear_right_derive(&mut self) { self.right_derive = false } -#[inline] pub fn set_right_derive(&mut self, v: bool) { self.right_derive = v; } -#[inline] pub fn get_right_derive(&self) -> bool { self.right_derive } -} -impl ::protobuf::Clear for BatchSplitRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BatchSplitRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchSplitRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchSplitRequest = BatchSplitRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BatchSplitRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_requests(&mut self) { + self.requests.clear(); + } + #[inline] + pub fn set_requests(&mut self, v: ::std::vec::Vec) { + self.requests = v; + } + #[inline] + pub fn get_requests(&self) -> &::std::vec::Vec { + &self.requests + } + #[inline] + pub fn mut_requests(&mut self) -> &mut ::std::vec::Vec { + &mut self.requests + } + #[inline] + pub fn take_requests(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_right_derive(&mut self) { + self.right_derive = false + } + #[inline] + pub fn set_right_derive(&mut self, v: bool) { + self.right_derive = v; + } + #[inline] + pub fn get_right_derive(&self) -> bool { + self.right_derive + } +} +impl ::protobuf::Clear for BatchSplitRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BatchSplitRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchSplitRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchSplitRequest = BatchSplitRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl BatchSplitResponse { -pub fn new_() -> BatchSplitResponse { ::std::default::Default::default() } -#[inline] pub fn clear_regions(&mut self) { self.regions.clear(); } -#[inline] pub fn set_regions(&mut self, v: :: std :: vec :: Vec < super :: metapb :: Region >) { self.regions = v; } -#[inline] pub fn get_regions(&self) -> &:: std :: vec :: Vec < super :: metapb :: Region > { &self.regions } -#[inline] pub fn mut_regions(&mut self) -> &mut :: std :: vec :: Vec < super :: metapb :: Region > { &mut self.regions } -#[inline] pub fn take_regions(&mut self) -> :: std :: vec :: Vec < super :: metapb :: Region > { ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for BatchSplitResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for BatchSplitResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchSplitResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchSplitResponse = BatchSplitResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> BatchSplitResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_regions(&mut self) { + self.regions.clear(); + } + #[inline] + pub fn set_regions(&mut self, v: ::std::vec::Vec) { + self.regions = v; + } + #[inline] + pub fn get_regions(&self) -> &::std::vec::Vec { + &self.regions + } + #[inline] + pub fn mut_regions(&mut self) -> &mut ::std::vec::Vec { + &mut self.regions + } + #[inline] + pub fn take_regions(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.regions, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for BatchSplitResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for BatchSplitResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchSplitResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchSplitResponse = BatchSplitResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactLogRequest { -pub fn new_() -> CompactLogRequest { ::std::default::Default::default() } -#[inline] pub fn clear_compact_index(&mut self) { self.compact_index = 0 } -#[inline] pub fn set_compact_index(&mut self, v: u64) { self.compact_index = v; } -#[inline] pub fn get_compact_index(&self) -> u64 { self.compact_index } -#[inline] pub fn clear_compact_term(&mut self) { self.compact_term = 0 } -#[inline] pub fn set_compact_term(&mut self, v: u64) { self.compact_term = v; } -#[inline] pub fn get_compact_term(&self) -> u64 { self.compact_term } -} -impl ::protobuf::Clear for CompactLogRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CompactLogRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactLogRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactLogRequest = CompactLogRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CompactLogRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_compact_index(&mut self) { + self.compact_index = 0 + } + #[inline] + pub fn set_compact_index(&mut self, v: u64) { + self.compact_index = v; + } + #[inline] + pub fn get_compact_index(&self) -> u64 { + self.compact_index + } + #[inline] + pub fn clear_compact_term(&mut self) { + self.compact_term = 0 + } + #[inline] + pub fn set_compact_term(&mut self, v: u64) { + self.compact_term = v; + } + #[inline] + pub fn get_compact_term(&self) -> u64 { + self.compact_term + } +} +impl ::protobuf::Clear for CompactLogRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CompactLogRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactLogRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactLogRequest = CompactLogRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CompactLogResponse { -pub fn new_() -> CompactLogResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for CompactLogResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CompactLogResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CompactLogResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CompactLogResponse = CompactLogResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CompactLogResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for CompactLogResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CompactLogResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CompactLogResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CompactLogResponse = CompactLogResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl TransferLeaderRequest { -pub fn new_() -> TransferLeaderRequest { ::std::default::Default::default() } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -} -impl ::protobuf::Clear for TransferLeaderRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for TransferLeaderRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static TransferLeaderRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: TransferLeaderRequest = TransferLeaderRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> TransferLeaderRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } +} +impl ::protobuf::Clear for TransferLeaderRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for TransferLeaderRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static TransferLeaderRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: TransferLeaderRequest = TransferLeaderRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl TransferLeaderResponse { -pub fn new_() -> TransferLeaderResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for TransferLeaderResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for TransferLeaderResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static TransferLeaderResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: TransferLeaderResponse = TransferLeaderResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> TransferLeaderResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for TransferLeaderResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for TransferLeaderResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static TransferLeaderResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: TransferLeaderResponse = TransferLeaderResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl VerifyHashRequest { -pub fn new_() -> VerifyHashRequest { ::std::default::Default::default() } -#[inline] pub fn clear_index(&mut self) { self.index = 0 } -#[inline] pub fn set_index(&mut self, v: u64) { self.index = v; } -#[inline] pub fn get_index(&self) -> u64 { self.index } -#[inline] pub fn clear_hash(&mut self) { self.hash.clear(); } -#[inline] pub fn set_hash(&mut self, v: std :: vec :: Vec < u8 >) { self.hash = v; } -#[inline] pub fn get_hash(&self) -> &[u8] { &self.hash } -#[inline] pub fn mut_hash(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.hash } -#[inline] pub fn take_hash(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.hash, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for VerifyHashRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for VerifyHashRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static VerifyHashRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: VerifyHashRequest = VerifyHashRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> VerifyHashRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_index(&mut self) { + self.index = 0 + } + #[inline] + pub fn set_index(&mut self, v: u64) { + self.index = v; + } + #[inline] + pub fn get_index(&self) -> u64 { + self.index + } + #[inline] + pub fn clear_hash(&mut self) { + self.hash.clear(); + } + #[inline] + pub fn set_hash(&mut self, v: std::vec::Vec) { + self.hash = v; + } + #[inline] + pub fn get_hash(&self) -> &[u8] { + &self.hash + } + #[inline] + pub fn mut_hash(&mut self) -> &mut std::vec::Vec { + &mut self.hash + } + #[inline] + pub fn take_hash(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.hash, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for VerifyHashRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for VerifyHashRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static VerifyHashRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: VerifyHashRequest = VerifyHashRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl VerifyHashResponse { -pub fn new_() -> VerifyHashResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for VerifyHashResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for VerifyHashResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static VerifyHashResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: VerifyHashResponse = VerifyHashResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> VerifyHashResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for VerifyHashResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for VerifyHashResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static VerifyHashResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: VerifyHashResponse = VerifyHashResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PrepareMergeRequest { -pub fn new_() -> PrepareMergeRequest { ::std::default::Default::default() } -#[inline] pub fn clear_min_index(&mut self) { self.min_index = 0 } -#[inline] pub fn set_min_index(&mut self, v: u64) { self.min_index = v; } -#[inline] pub fn get_min_index(&self) -> u64 { self.min_index } -#[inline] pub fn has_target(&self) -> bool { self.target.is_some() } -#[inline] pub fn clear_target(&mut self) { self.target = ::std::option::Option::None } -#[inline] pub fn set_target(&mut self, v: super :: metapb :: Region) { self.target = ::std::option::Option::Some(v); } -#[inline] pub fn get_target(&self) -> &super :: metapb :: Region { match self.target.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_target(&mut self) -> &mut super :: metapb :: Region { if self.target.is_none() { - self.target = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.target.as_mut().unwrap() } -#[inline] pub fn take_target(&mut self) -> super :: metapb :: Region { self.target.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for PrepareMergeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PrepareMergeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PrepareMergeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: PrepareMergeRequest = PrepareMergeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PrepareMergeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_min_index(&mut self) { + self.min_index = 0 + } + #[inline] + pub fn set_min_index(&mut self, v: u64) { + self.min_index = v; + } + #[inline] + pub fn get_min_index(&self) -> u64 { + self.min_index + } + #[inline] + pub fn has_target(&self) -> bool { + self.target.is_some() + } + #[inline] + pub fn clear_target(&mut self) { + self.target = ::std::option::Option::None + } + #[inline] + pub fn set_target(&mut self, v: super::metapb::Region) { + self.target = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_target(&self) -> &super::metapb::Region { + match self.target.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_target(&mut self) -> &mut super::metapb::Region { + if self.target.is_none() { + self.target = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.target.as_mut().unwrap() + } + #[inline] + pub fn take_target(&mut self) -> super::metapb::Region { + self.target + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for PrepareMergeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PrepareMergeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PrepareMergeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: PrepareMergeRequest = PrepareMergeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl PrepareMergeResponse { -pub fn new_() -> PrepareMergeResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for PrepareMergeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for PrepareMergeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static PrepareMergeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: PrepareMergeResponse = PrepareMergeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> PrepareMergeResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for PrepareMergeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for PrepareMergeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static PrepareMergeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: PrepareMergeResponse = PrepareMergeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CommitMergeRequest { -pub fn new_() -> CommitMergeRequest { ::std::default::Default::default() } -#[inline] pub fn has_source(&self) -> bool { self.source.is_some() } -#[inline] pub fn clear_source(&mut self) { self.source = ::std::option::Option::None } -#[inline] pub fn set_source(&mut self, v: super :: metapb :: Region) { self.source = ::std::option::Option::Some(v); } -#[inline] pub fn get_source(&self) -> &super :: metapb :: Region { match self.source.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_source(&mut self) -> &mut super :: metapb :: Region { if self.source.is_none() { - self.source = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.source.as_mut().unwrap() } -#[inline] pub fn take_source(&mut self) -> super :: metapb :: Region { self.source.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn clear_commit(&mut self) { self.commit = 0 } -#[inline] pub fn set_commit(&mut self, v: u64) { self.commit = v; } -#[inline] pub fn get_commit(&self) -> u64 { self.commit } -#[inline] pub fn clear_entries(&mut self) { self.entries.clear(); } -#[inline] pub fn set_entries(&mut self, v: :: std :: vec :: Vec < super :: eraftpb :: Entry >) { self.entries = v; } -#[inline] pub fn get_entries(&self) -> &:: std :: vec :: Vec < super :: eraftpb :: Entry > { &self.entries } -#[inline] pub fn mut_entries(&mut self) -> &mut :: std :: vec :: Vec < super :: eraftpb :: Entry > { &mut self.entries } -#[inline] pub fn take_entries(&mut self) -> :: std :: vec :: Vec < super :: eraftpb :: Entry > { ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for CommitMergeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CommitMergeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommitMergeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommitMergeRequest = CommitMergeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CommitMergeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_source(&self) -> bool { + self.source.is_some() + } + #[inline] + pub fn clear_source(&mut self) { + self.source = ::std::option::Option::None + } + #[inline] + pub fn set_source(&mut self, v: super::metapb::Region) { + self.source = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_source(&self) -> &super::metapb::Region { + match self.source.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_source(&mut self) -> &mut super::metapb::Region { + if self.source.is_none() { + self.source = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.source.as_mut().unwrap() + } + #[inline] + pub fn take_source(&mut self) -> super::metapb::Region { + self.source + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn clear_commit(&mut self) { + self.commit = 0 + } + #[inline] + pub fn set_commit(&mut self, v: u64) { + self.commit = v; + } + #[inline] + pub fn get_commit(&self) -> u64 { + self.commit + } + #[inline] + pub fn clear_entries(&mut self) { + self.entries.clear(); + } + #[inline] + pub fn set_entries(&mut self, v: ::std::vec::Vec) { + self.entries = v; + } + #[inline] + pub fn get_entries(&self) -> &::std::vec::Vec { + &self.entries + } + #[inline] + pub fn mut_entries(&mut self) -> &mut ::std::vec::Vec { + &mut self.entries + } + #[inline] + pub fn take_entries(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.entries, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for CommitMergeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CommitMergeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommitMergeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommitMergeRequest = CommitMergeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CommitMergeResponse { -pub fn new_() -> CommitMergeResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for CommitMergeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for CommitMergeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static CommitMergeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: CommitMergeResponse = CommitMergeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> CommitMergeResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for CommitMergeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for CommitMergeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static CommitMergeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: CommitMergeResponse = CommitMergeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RollbackMergeRequest { -pub fn new_() -> RollbackMergeRequest { ::std::default::Default::default() } -#[inline] pub fn clear_commit(&mut self) { self.commit = 0 } -#[inline] pub fn set_commit(&mut self, v: u64) { self.commit = v; } -#[inline] pub fn get_commit(&self) -> u64 { self.commit } -} -impl ::protobuf::Clear for RollbackMergeRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RollbackMergeRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RollbackMergeRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RollbackMergeRequest = RollbackMergeRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RollbackMergeRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_commit(&mut self) { + self.commit = 0 + } + #[inline] + pub fn set_commit(&mut self, v: u64) { + self.commit = v; + } + #[inline] + pub fn get_commit(&self) -> u64 { + self.commit + } +} +impl ::protobuf::Clear for RollbackMergeRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RollbackMergeRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RollbackMergeRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RollbackMergeRequest = RollbackMergeRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RollbackMergeResponse { -pub fn new_() -> RollbackMergeResponse { ::std::default::Default::default() } -} -impl ::protobuf::Clear for RollbackMergeResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RollbackMergeResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RollbackMergeResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RollbackMergeResponse = RollbackMergeResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RollbackMergeResponse { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for RollbackMergeResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RollbackMergeResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RollbackMergeResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RollbackMergeResponse = RollbackMergeResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AdminRequest { -pub fn new_() -> AdminRequest { ::std::default::Default::default() } -#[inline] pub fn clear_cmd_type(&mut self) { self.cmd_type = 0 } -#[inline] pub fn set_cmd_type_(&mut self, v: AdminCmdType) { self.cmd_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_cmd_type(&self) -> AdminCmdType { unsafe { ::std::mem::transmute::(self.cmd_type) } } -#[inline] pub fn has_change_peer(&self) -> bool { self.change_peer.is_some() } -#[inline] pub fn clear_change_peer(&mut self) { self.change_peer = ::std::option::Option::None } -#[inline] pub fn set_change_peer(&mut self, v: ChangePeerRequest) { self.change_peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_change_peer(&self) -> &ChangePeerRequest { match self.change_peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_change_peer(&mut self) -> &mut ChangePeerRequest { if self.change_peer.is_none() { - self.change_peer = ::std::option::Option::Some(ChangePeerRequest::default()); - } - self.change_peer.as_mut().unwrap() } -#[inline] pub fn take_change_peer(&mut self) -> ChangePeerRequest { self.change_peer.take().unwrap_or_else(ChangePeerRequest::default) } -#[inline] pub fn has_split(&self) -> bool { self.split.is_some() } -#[inline] pub fn clear_split(&mut self) { self.split = ::std::option::Option::None } -#[inline] pub fn set_split(&mut self, v: SplitRequest) { self.split = ::std::option::Option::Some(v); } -#[inline] pub fn get_split(&self) -> &SplitRequest { match self.split.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_split(&mut self) -> &mut SplitRequest { if self.split.is_none() { - self.split = ::std::option::Option::Some(SplitRequest::default()); - } - self.split.as_mut().unwrap() } -#[inline] pub fn take_split(&mut self) -> SplitRequest { self.split.take().unwrap_or_else(SplitRequest::default) } -#[inline] pub fn has_compact_log(&self) -> bool { self.compact_log.is_some() } -#[inline] pub fn clear_compact_log(&mut self) { self.compact_log = ::std::option::Option::None } -#[inline] pub fn set_compact_log(&mut self, v: CompactLogRequest) { self.compact_log = ::std::option::Option::Some(v); } -#[inline] pub fn get_compact_log(&self) -> &CompactLogRequest { match self.compact_log.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_compact_log(&mut self) -> &mut CompactLogRequest { if self.compact_log.is_none() { - self.compact_log = ::std::option::Option::Some(CompactLogRequest::default()); - } - self.compact_log.as_mut().unwrap() } -#[inline] pub fn take_compact_log(&mut self) -> CompactLogRequest { self.compact_log.take().unwrap_or_else(CompactLogRequest::default) } -#[inline] pub fn has_transfer_leader(&self) -> bool { self.transfer_leader.is_some() } -#[inline] pub fn clear_transfer_leader(&mut self) { self.transfer_leader = ::std::option::Option::None } -#[inline] pub fn set_transfer_leader(&mut self, v: TransferLeaderRequest) { self.transfer_leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_transfer_leader(&self) -> &TransferLeaderRequest { match self.transfer_leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_transfer_leader(&mut self) -> &mut TransferLeaderRequest { if self.transfer_leader.is_none() { - self.transfer_leader = ::std::option::Option::Some(TransferLeaderRequest::default()); - } - self.transfer_leader.as_mut().unwrap() } -#[inline] pub fn take_transfer_leader(&mut self) -> TransferLeaderRequest { self.transfer_leader.take().unwrap_or_else(TransferLeaderRequest::default) } -#[inline] pub fn has_verify_hash(&self) -> bool { self.verify_hash.is_some() } -#[inline] pub fn clear_verify_hash(&mut self) { self.verify_hash = ::std::option::Option::None } -#[inline] pub fn set_verify_hash(&mut self, v: VerifyHashRequest) { self.verify_hash = ::std::option::Option::Some(v); } -#[inline] pub fn get_verify_hash(&self) -> &VerifyHashRequest { match self.verify_hash.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_verify_hash(&mut self) -> &mut VerifyHashRequest { if self.verify_hash.is_none() { - self.verify_hash = ::std::option::Option::Some(VerifyHashRequest::default()); - } - self.verify_hash.as_mut().unwrap() } -#[inline] pub fn take_verify_hash(&mut self) -> VerifyHashRequest { self.verify_hash.take().unwrap_or_else(VerifyHashRequest::default) } -#[inline] pub fn has_prepare_merge(&self) -> bool { self.prepare_merge.is_some() } -#[inline] pub fn clear_prepare_merge(&mut self) { self.prepare_merge = ::std::option::Option::None } -#[inline] pub fn set_prepare_merge(&mut self, v: PrepareMergeRequest) { self.prepare_merge = ::std::option::Option::Some(v); } -#[inline] pub fn get_prepare_merge(&self) -> &PrepareMergeRequest { match self.prepare_merge.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_prepare_merge(&mut self) -> &mut PrepareMergeRequest { if self.prepare_merge.is_none() { - self.prepare_merge = ::std::option::Option::Some(PrepareMergeRequest::default()); - } - self.prepare_merge.as_mut().unwrap() } -#[inline] pub fn take_prepare_merge(&mut self) -> PrepareMergeRequest { self.prepare_merge.take().unwrap_or_else(PrepareMergeRequest::default) } -#[inline] pub fn has_commit_merge(&self) -> bool { self.commit_merge.is_some() } -#[inline] pub fn clear_commit_merge(&mut self) { self.commit_merge = ::std::option::Option::None } -#[inline] pub fn set_commit_merge(&mut self, v: CommitMergeRequest) { self.commit_merge = ::std::option::Option::Some(v); } -#[inline] pub fn get_commit_merge(&self) -> &CommitMergeRequest { match self.commit_merge.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_commit_merge(&mut self) -> &mut CommitMergeRequest { if self.commit_merge.is_none() { - self.commit_merge = ::std::option::Option::Some(CommitMergeRequest::default()); - } - self.commit_merge.as_mut().unwrap() } -#[inline] pub fn take_commit_merge(&mut self) -> CommitMergeRequest { self.commit_merge.take().unwrap_or_else(CommitMergeRequest::default) } -#[inline] pub fn has_rollback_merge(&self) -> bool { self.rollback_merge.is_some() } -#[inline] pub fn clear_rollback_merge(&mut self) { self.rollback_merge = ::std::option::Option::None } -#[inline] pub fn set_rollback_merge(&mut self, v: RollbackMergeRequest) { self.rollback_merge = ::std::option::Option::Some(v); } -#[inline] pub fn get_rollback_merge(&self) -> &RollbackMergeRequest { match self.rollback_merge.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_rollback_merge(&mut self) -> &mut RollbackMergeRequest { if self.rollback_merge.is_none() { - self.rollback_merge = ::std::option::Option::Some(RollbackMergeRequest::default()); - } - self.rollback_merge.as_mut().unwrap() } -#[inline] pub fn take_rollback_merge(&mut self) -> RollbackMergeRequest { self.rollback_merge.take().unwrap_or_else(RollbackMergeRequest::default) } -#[inline] pub fn has_splits(&self) -> bool { self.splits.is_some() } -#[inline] pub fn clear_splits(&mut self) { self.splits = ::std::option::Option::None } -#[inline] pub fn set_splits(&mut self, v: BatchSplitRequest) { self.splits = ::std::option::Option::Some(v); } -#[inline] pub fn get_splits(&self) -> &BatchSplitRequest { match self.splits.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_splits(&mut self) -> &mut BatchSplitRequest { if self.splits.is_none() { - self.splits = ::std::option::Option::Some(BatchSplitRequest::default()); - } - self.splits.as_mut().unwrap() } -#[inline] pub fn take_splits(&mut self) -> BatchSplitRequest { self.splits.take().unwrap_or_else(BatchSplitRequest::default) } -} -impl ::protobuf::Clear for AdminRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AdminRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AdminRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: AdminRequest = AdminRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AdminRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cmd_type(&mut self) { + self.cmd_type = 0 + } + #[inline] + pub fn set_cmd_type_(&mut self, v: AdminCmdType) { + self.cmd_type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_cmd_type(&self) -> AdminCmdType { + unsafe { ::std::mem::transmute::(self.cmd_type) } + } + #[inline] + pub fn has_change_peer(&self) -> bool { + self.change_peer.is_some() + } + #[inline] + pub fn clear_change_peer(&mut self) { + self.change_peer = ::std::option::Option::None + } + #[inline] + pub fn set_change_peer(&mut self, v: ChangePeerRequest) { + self.change_peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_change_peer(&self) -> &ChangePeerRequest { + match self.change_peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_change_peer(&mut self) -> &mut ChangePeerRequest { + if self.change_peer.is_none() { + self.change_peer = ::std::option::Option::Some(ChangePeerRequest::default()); + } + self.change_peer.as_mut().unwrap() + } + #[inline] + pub fn take_change_peer(&mut self) -> ChangePeerRequest { + self.change_peer + .take() + .unwrap_or_else(ChangePeerRequest::default) + } + #[inline] + pub fn has_split(&self) -> bool { + self.split.is_some() + } + #[inline] + pub fn clear_split(&mut self) { + self.split = ::std::option::Option::None + } + #[inline] + pub fn set_split(&mut self, v: SplitRequest) { + self.split = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_split(&self) -> &SplitRequest { + match self.split.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_split(&mut self) -> &mut SplitRequest { + if self.split.is_none() { + self.split = ::std::option::Option::Some(SplitRequest::default()); + } + self.split.as_mut().unwrap() + } + #[inline] + pub fn take_split(&mut self) -> SplitRequest { + self.split.take().unwrap_or_else(SplitRequest::default) + } + #[inline] + pub fn has_compact_log(&self) -> bool { + self.compact_log.is_some() + } + #[inline] + pub fn clear_compact_log(&mut self) { + self.compact_log = ::std::option::Option::None + } + #[inline] + pub fn set_compact_log(&mut self, v: CompactLogRequest) { + self.compact_log = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_compact_log(&self) -> &CompactLogRequest { + match self.compact_log.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_compact_log(&mut self) -> &mut CompactLogRequest { + if self.compact_log.is_none() { + self.compact_log = ::std::option::Option::Some(CompactLogRequest::default()); + } + self.compact_log.as_mut().unwrap() + } + #[inline] + pub fn take_compact_log(&mut self) -> CompactLogRequest { + self.compact_log + .take() + .unwrap_or_else(CompactLogRequest::default) + } + #[inline] + pub fn has_transfer_leader(&self) -> bool { + self.transfer_leader.is_some() + } + #[inline] + pub fn clear_transfer_leader(&mut self) { + self.transfer_leader = ::std::option::Option::None + } + #[inline] + pub fn set_transfer_leader(&mut self, v: TransferLeaderRequest) { + self.transfer_leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_transfer_leader(&self) -> &TransferLeaderRequest { + match self.transfer_leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_transfer_leader(&mut self) -> &mut TransferLeaderRequest { + if self.transfer_leader.is_none() { + self.transfer_leader = ::std::option::Option::Some(TransferLeaderRequest::default()); + } + self.transfer_leader.as_mut().unwrap() + } + #[inline] + pub fn take_transfer_leader(&mut self) -> TransferLeaderRequest { + self.transfer_leader + .take() + .unwrap_or_else(TransferLeaderRequest::default) + } + #[inline] + pub fn has_verify_hash(&self) -> bool { + self.verify_hash.is_some() + } + #[inline] + pub fn clear_verify_hash(&mut self) { + self.verify_hash = ::std::option::Option::None + } + #[inline] + pub fn set_verify_hash(&mut self, v: VerifyHashRequest) { + self.verify_hash = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_verify_hash(&self) -> &VerifyHashRequest { + match self.verify_hash.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_verify_hash(&mut self) -> &mut VerifyHashRequest { + if self.verify_hash.is_none() { + self.verify_hash = ::std::option::Option::Some(VerifyHashRequest::default()); + } + self.verify_hash.as_mut().unwrap() + } + #[inline] + pub fn take_verify_hash(&mut self) -> VerifyHashRequest { + self.verify_hash + .take() + .unwrap_or_else(VerifyHashRequest::default) + } + #[inline] + pub fn has_prepare_merge(&self) -> bool { + self.prepare_merge.is_some() + } + #[inline] + pub fn clear_prepare_merge(&mut self) { + self.prepare_merge = ::std::option::Option::None + } + #[inline] + pub fn set_prepare_merge(&mut self, v: PrepareMergeRequest) { + self.prepare_merge = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_prepare_merge(&self) -> &PrepareMergeRequest { + match self.prepare_merge.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_prepare_merge(&mut self) -> &mut PrepareMergeRequest { + if self.prepare_merge.is_none() { + self.prepare_merge = ::std::option::Option::Some(PrepareMergeRequest::default()); + } + self.prepare_merge.as_mut().unwrap() + } + #[inline] + pub fn take_prepare_merge(&mut self) -> PrepareMergeRequest { + self.prepare_merge + .take() + .unwrap_or_else(PrepareMergeRequest::default) + } + #[inline] + pub fn has_commit_merge(&self) -> bool { + self.commit_merge.is_some() + } + #[inline] + pub fn clear_commit_merge(&mut self) { + self.commit_merge = ::std::option::Option::None + } + #[inline] + pub fn set_commit_merge(&mut self, v: CommitMergeRequest) { + self.commit_merge = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_commit_merge(&self) -> &CommitMergeRequest { + match self.commit_merge.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_commit_merge(&mut self) -> &mut CommitMergeRequest { + if self.commit_merge.is_none() { + self.commit_merge = ::std::option::Option::Some(CommitMergeRequest::default()); + } + self.commit_merge.as_mut().unwrap() + } + #[inline] + pub fn take_commit_merge(&mut self) -> CommitMergeRequest { + self.commit_merge + .take() + .unwrap_or_else(CommitMergeRequest::default) + } + #[inline] + pub fn has_rollback_merge(&self) -> bool { + self.rollback_merge.is_some() + } + #[inline] + pub fn clear_rollback_merge(&mut self) { + self.rollback_merge = ::std::option::Option::None + } + #[inline] + pub fn set_rollback_merge(&mut self, v: RollbackMergeRequest) { + self.rollback_merge = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_rollback_merge(&self) -> &RollbackMergeRequest { + match self.rollback_merge.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_rollback_merge(&mut self) -> &mut RollbackMergeRequest { + if self.rollback_merge.is_none() { + self.rollback_merge = ::std::option::Option::Some(RollbackMergeRequest::default()); + } + self.rollback_merge.as_mut().unwrap() + } + #[inline] + pub fn take_rollback_merge(&mut self) -> RollbackMergeRequest { + self.rollback_merge + .take() + .unwrap_or_else(RollbackMergeRequest::default) + } + #[inline] + pub fn has_splits(&self) -> bool { + self.splits.is_some() + } + #[inline] + pub fn clear_splits(&mut self) { + self.splits = ::std::option::Option::None + } + #[inline] + pub fn set_splits(&mut self, v: BatchSplitRequest) { + self.splits = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_splits(&self) -> &BatchSplitRequest { + match self.splits.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_splits(&mut self) -> &mut BatchSplitRequest { + if self.splits.is_none() { + self.splits = ::std::option::Option::Some(BatchSplitRequest::default()); + } + self.splits.as_mut().unwrap() + } + #[inline] + pub fn take_splits(&mut self) -> BatchSplitRequest { + self.splits + .take() + .unwrap_or_else(BatchSplitRequest::default) + } +} +impl ::protobuf::Clear for AdminRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AdminRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AdminRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: AdminRequest = AdminRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl AdminResponse { -pub fn new_() -> AdminResponse { ::std::default::Default::default() } -#[inline] pub fn clear_cmd_type(&mut self) { self.cmd_type = 0 } -#[inline] pub fn set_cmd_type_(&mut self, v: AdminCmdType) { self.cmd_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_cmd_type(&self) -> AdminCmdType { unsafe { ::std::mem::transmute::(self.cmd_type) } } -#[inline] pub fn has_change_peer(&self) -> bool { self.change_peer.is_some() } -#[inline] pub fn clear_change_peer(&mut self) { self.change_peer = ::std::option::Option::None } -#[inline] pub fn set_change_peer(&mut self, v: ChangePeerResponse) { self.change_peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_change_peer(&self) -> &ChangePeerResponse { match self.change_peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_change_peer(&mut self) -> &mut ChangePeerResponse { if self.change_peer.is_none() { - self.change_peer = ::std::option::Option::Some(ChangePeerResponse::default()); - } - self.change_peer.as_mut().unwrap() } -#[inline] pub fn take_change_peer(&mut self) -> ChangePeerResponse { self.change_peer.take().unwrap_or_else(ChangePeerResponse::default) } -#[inline] pub fn has_split(&self) -> bool { self.split.is_some() } -#[inline] pub fn clear_split(&mut self) { self.split = ::std::option::Option::None } -#[inline] pub fn set_split(&mut self, v: SplitResponse) { self.split = ::std::option::Option::Some(v); } -#[inline] pub fn get_split(&self) -> &SplitResponse { match self.split.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_split(&mut self) -> &mut SplitResponse { if self.split.is_none() { - self.split = ::std::option::Option::Some(SplitResponse::default()); - } - self.split.as_mut().unwrap() } -#[inline] pub fn take_split(&mut self) -> SplitResponse { self.split.take().unwrap_or_else(SplitResponse::default) } -#[inline] pub fn has_compact_log(&self) -> bool { self.compact_log.is_some() } -#[inline] pub fn clear_compact_log(&mut self) { self.compact_log = ::std::option::Option::None } -#[inline] pub fn set_compact_log(&mut self, v: CompactLogResponse) { self.compact_log = ::std::option::Option::Some(v); } -#[inline] pub fn get_compact_log(&self) -> &CompactLogResponse { match self.compact_log.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_compact_log(&mut self) -> &mut CompactLogResponse { if self.compact_log.is_none() { - self.compact_log = ::std::option::Option::Some(CompactLogResponse::default()); - } - self.compact_log.as_mut().unwrap() } -#[inline] pub fn take_compact_log(&mut self) -> CompactLogResponse { self.compact_log.take().unwrap_or_else(CompactLogResponse::default) } -#[inline] pub fn has_transfer_leader(&self) -> bool { self.transfer_leader.is_some() } -#[inline] pub fn clear_transfer_leader(&mut self) { self.transfer_leader = ::std::option::Option::None } -#[inline] pub fn set_transfer_leader(&mut self, v: TransferLeaderResponse) { self.transfer_leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_transfer_leader(&self) -> &TransferLeaderResponse { match self.transfer_leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_transfer_leader(&mut self) -> &mut TransferLeaderResponse { if self.transfer_leader.is_none() { - self.transfer_leader = ::std::option::Option::Some(TransferLeaderResponse::default()); - } - self.transfer_leader.as_mut().unwrap() } -#[inline] pub fn take_transfer_leader(&mut self) -> TransferLeaderResponse { self.transfer_leader.take().unwrap_or_else(TransferLeaderResponse::default) } -#[inline] pub fn has_verify_hash(&self) -> bool { self.verify_hash.is_some() } -#[inline] pub fn clear_verify_hash(&mut self) { self.verify_hash = ::std::option::Option::None } -#[inline] pub fn set_verify_hash(&mut self, v: VerifyHashResponse) { self.verify_hash = ::std::option::Option::Some(v); } -#[inline] pub fn get_verify_hash(&self) -> &VerifyHashResponse { match self.verify_hash.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_verify_hash(&mut self) -> &mut VerifyHashResponse { if self.verify_hash.is_none() { - self.verify_hash = ::std::option::Option::Some(VerifyHashResponse::default()); - } - self.verify_hash.as_mut().unwrap() } -#[inline] pub fn take_verify_hash(&mut self) -> VerifyHashResponse { self.verify_hash.take().unwrap_or_else(VerifyHashResponse::default) } -#[inline] pub fn has_prepare_merge(&self) -> bool { self.prepare_merge.is_some() } -#[inline] pub fn clear_prepare_merge(&mut self) { self.prepare_merge = ::std::option::Option::None } -#[inline] pub fn set_prepare_merge(&mut self, v: PrepareMergeResponse) { self.prepare_merge = ::std::option::Option::Some(v); } -#[inline] pub fn get_prepare_merge(&self) -> &PrepareMergeResponse { match self.prepare_merge.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_prepare_merge(&mut self) -> &mut PrepareMergeResponse { if self.prepare_merge.is_none() { - self.prepare_merge = ::std::option::Option::Some(PrepareMergeResponse::default()); - } - self.prepare_merge.as_mut().unwrap() } -#[inline] pub fn take_prepare_merge(&mut self) -> PrepareMergeResponse { self.prepare_merge.take().unwrap_or_else(PrepareMergeResponse::default) } -#[inline] pub fn has_commit_merge(&self) -> bool { self.commit_merge.is_some() } -#[inline] pub fn clear_commit_merge(&mut self) { self.commit_merge = ::std::option::Option::None } -#[inline] pub fn set_commit_merge(&mut self, v: CommitMergeResponse) { self.commit_merge = ::std::option::Option::Some(v); } -#[inline] pub fn get_commit_merge(&self) -> &CommitMergeResponse { match self.commit_merge.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_commit_merge(&mut self) -> &mut CommitMergeResponse { if self.commit_merge.is_none() { - self.commit_merge = ::std::option::Option::Some(CommitMergeResponse::default()); - } - self.commit_merge.as_mut().unwrap() } -#[inline] pub fn take_commit_merge(&mut self) -> CommitMergeResponse { self.commit_merge.take().unwrap_or_else(CommitMergeResponse::default) } -#[inline] pub fn has_rollback_merge(&self) -> bool { self.rollback_merge.is_some() } -#[inline] pub fn clear_rollback_merge(&mut self) { self.rollback_merge = ::std::option::Option::None } -#[inline] pub fn set_rollback_merge(&mut self, v: RollbackMergeResponse) { self.rollback_merge = ::std::option::Option::Some(v); } -#[inline] pub fn get_rollback_merge(&self) -> &RollbackMergeResponse { match self.rollback_merge.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_rollback_merge(&mut self) -> &mut RollbackMergeResponse { if self.rollback_merge.is_none() { - self.rollback_merge = ::std::option::Option::Some(RollbackMergeResponse::default()); - } - self.rollback_merge.as_mut().unwrap() } -#[inline] pub fn take_rollback_merge(&mut self) -> RollbackMergeResponse { self.rollback_merge.take().unwrap_or_else(RollbackMergeResponse::default) } -#[inline] pub fn has_splits(&self) -> bool { self.splits.is_some() } -#[inline] pub fn clear_splits(&mut self) { self.splits = ::std::option::Option::None } -#[inline] pub fn set_splits(&mut self, v: BatchSplitResponse) { self.splits = ::std::option::Option::Some(v); } -#[inline] pub fn get_splits(&self) -> &BatchSplitResponse { match self.splits.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_splits(&mut self) -> &mut BatchSplitResponse { if self.splits.is_none() { - self.splits = ::std::option::Option::Some(BatchSplitResponse::default()); - } - self.splits.as_mut().unwrap() } -#[inline] pub fn take_splits(&mut self) -> BatchSplitResponse { self.splits.take().unwrap_or_else(BatchSplitResponse::default) } -} -impl ::protobuf::Clear for AdminResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for AdminResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static AdminResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: AdminResponse = AdminResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> AdminResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cmd_type(&mut self) { + self.cmd_type = 0 + } + #[inline] + pub fn set_cmd_type_(&mut self, v: AdminCmdType) { + self.cmd_type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_cmd_type(&self) -> AdminCmdType { + unsafe { ::std::mem::transmute::(self.cmd_type) } + } + #[inline] + pub fn has_change_peer(&self) -> bool { + self.change_peer.is_some() + } + #[inline] + pub fn clear_change_peer(&mut self) { + self.change_peer = ::std::option::Option::None + } + #[inline] + pub fn set_change_peer(&mut self, v: ChangePeerResponse) { + self.change_peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_change_peer(&self) -> &ChangePeerResponse { + match self.change_peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_change_peer(&mut self) -> &mut ChangePeerResponse { + if self.change_peer.is_none() { + self.change_peer = ::std::option::Option::Some(ChangePeerResponse::default()); + } + self.change_peer.as_mut().unwrap() + } + #[inline] + pub fn take_change_peer(&mut self) -> ChangePeerResponse { + self.change_peer + .take() + .unwrap_or_else(ChangePeerResponse::default) + } + #[inline] + pub fn has_split(&self) -> bool { + self.split.is_some() + } + #[inline] + pub fn clear_split(&mut self) { + self.split = ::std::option::Option::None + } + #[inline] + pub fn set_split(&mut self, v: SplitResponse) { + self.split = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_split(&self) -> &SplitResponse { + match self.split.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_split(&mut self) -> &mut SplitResponse { + if self.split.is_none() { + self.split = ::std::option::Option::Some(SplitResponse::default()); + } + self.split.as_mut().unwrap() + } + #[inline] + pub fn take_split(&mut self) -> SplitResponse { + self.split.take().unwrap_or_else(SplitResponse::default) + } + #[inline] + pub fn has_compact_log(&self) -> bool { + self.compact_log.is_some() + } + #[inline] + pub fn clear_compact_log(&mut self) { + self.compact_log = ::std::option::Option::None + } + #[inline] + pub fn set_compact_log(&mut self, v: CompactLogResponse) { + self.compact_log = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_compact_log(&self) -> &CompactLogResponse { + match self.compact_log.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_compact_log(&mut self) -> &mut CompactLogResponse { + if self.compact_log.is_none() { + self.compact_log = ::std::option::Option::Some(CompactLogResponse::default()); + } + self.compact_log.as_mut().unwrap() + } + #[inline] + pub fn take_compact_log(&mut self) -> CompactLogResponse { + self.compact_log + .take() + .unwrap_or_else(CompactLogResponse::default) + } + #[inline] + pub fn has_transfer_leader(&self) -> bool { + self.transfer_leader.is_some() + } + #[inline] + pub fn clear_transfer_leader(&mut self) { + self.transfer_leader = ::std::option::Option::None + } + #[inline] + pub fn set_transfer_leader(&mut self, v: TransferLeaderResponse) { + self.transfer_leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_transfer_leader(&self) -> &TransferLeaderResponse { + match self.transfer_leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_transfer_leader(&mut self) -> &mut TransferLeaderResponse { + if self.transfer_leader.is_none() { + self.transfer_leader = ::std::option::Option::Some(TransferLeaderResponse::default()); + } + self.transfer_leader.as_mut().unwrap() + } + #[inline] + pub fn take_transfer_leader(&mut self) -> TransferLeaderResponse { + self.transfer_leader + .take() + .unwrap_or_else(TransferLeaderResponse::default) + } + #[inline] + pub fn has_verify_hash(&self) -> bool { + self.verify_hash.is_some() + } + #[inline] + pub fn clear_verify_hash(&mut self) { + self.verify_hash = ::std::option::Option::None + } + #[inline] + pub fn set_verify_hash(&mut self, v: VerifyHashResponse) { + self.verify_hash = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_verify_hash(&self) -> &VerifyHashResponse { + match self.verify_hash.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_verify_hash(&mut self) -> &mut VerifyHashResponse { + if self.verify_hash.is_none() { + self.verify_hash = ::std::option::Option::Some(VerifyHashResponse::default()); + } + self.verify_hash.as_mut().unwrap() + } + #[inline] + pub fn take_verify_hash(&mut self) -> VerifyHashResponse { + self.verify_hash + .take() + .unwrap_or_else(VerifyHashResponse::default) + } + #[inline] + pub fn has_prepare_merge(&self) -> bool { + self.prepare_merge.is_some() + } + #[inline] + pub fn clear_prepare_merge(&mut self) { + self.prepare_merge = ::std::option::Option::None + } + #[inline] + pub fn set_prepare_merge(&mut self, v: PrepareMergeResponse) { + self.prepare_merge = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_prepare_merge(&self) -> &PrepareMergeResponse { + match self.prepare_merge.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_prepare_merge(&mut self) -> &mut PrepareMergeResponse { + if self.prepare_merge.is_none() { + self.prepare_merge = ::std::option::Option::Some(PrepareMergeResponse::default()); + } + self.prepare_merge.as_mut().unwrap() + } + #[inline] + pub fn take_prepare_merge(&mut self) -> PrepareMergeResponse { + self.prepare_merge + .take() + .unwrap_or_else(PrepareMergeResponse::default) + } + #[inline] + pub fn has_commit_merge(&self) -> bool { + self.commit_merge.is_some() + } + #[inline] + pub fn clear_commit_merge(&mut self) { + self.commit_merge = ::std::option::Option::None + } + #[inline] + pub fn set_commit_merge(&mut self, v: CommitMergeResponse) { + self.commit_merge = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_commit_merge(&self) -> &CommitMergeResponse { + match self.commit_merge.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_commit_merge(&mut self) -> &mut CommitMergeResponse { + if self.commit_merge.is_none() { + self.commit_merge = ::std::option::Option::Some(CommitMergeResponse::default()); + } + self.commit_merge.as_mut().unwrap() + } + #[inline] + pub fn take_commit_merge(&mut self) -> CommitMergeResponse { + self.commit_merge + .take() + .unwrap_or_else(CommitMergeResponse::default) + } + #[inline] + pub fn has_rollback_merge(&self) -> bool { + self.rollback_merge.is_some() + } + #[inline] + pub fn clear_rollback_merge(&mut self) { + self.rollback_merge = ::std::option::Option::None + } + #[inline] + pub fn set_rollback_merge(&mut self, v: RollbackMergeResponse) { + self.rollback_merge = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_rollback_merge(&self) -> &RollbackMergeResponse { + match self.rollback_merge.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_rollback_merge(&mut self) -> &mut RollbackMergeResponse { + if self.rollback_merge.is_none() { + self.rollback_merge = ::std::option::Option::Some(RollbackMergeResponse::default()); + } + self.rollback_merge.as_mut().unwrap() + } + #[inline] + pub fn take_rollback_merge(&mut self) -> RollbackMergeResponse { + self.rollback_merge + .take() + .unwrap_or_else(RollbackMergeResponse::default) + } + #[inline] + pub fn has_splits(&self) -> bool { + self.splits.is_some() + } + #[inline] + pub fn clear_splits(&mut self) { + self.splits = ::std::option::Option::None + } + #[inline] + pub fn set_splits(&mut self, v: BatchSplitResponse) { + self.splits = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_splits(&self) -> &BatchSplitResponse { + match self.splits.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_splits(&mut self) -> &mut BatchSplitResponse { + if self.splits.is_none() { + self.splits = ::std::option::Option::Some(BatchSplitResponse::default()); + } + self.splits.as_mut().unwrap() + } + #[inline] + pub fn take_splits(&mut self) -> BatchSplitResponse { + self.splits + .take() + .unwrap_or_else(BatchSplitResponse::default) + } +} +impl ::protobuf::Clear for AdminResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for AdminResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static AdminResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: AdminResponse = AdminResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionLeaderRequest { -pub fn new_() -> RegionLeaderRequest { ::std::default::Default::default() } -} -impl ::protobuf::Clear for RegionLeaderRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionLeaderRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionLeaderRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionLeaderRequest = RegionLeaderRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionLeaderRequest { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for RegionLeaderRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionLeaderRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionLeaderRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionLeaderRequest = RegionLeaderRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionLeaderResponse { -pub fn new_() -> RegionLeaderResponse { ::std::default::Default::default() } -#[inline] pub fn has_leader(&self) -> bool { self.leader.is_some() } -#[inline] pub fn clear_leader(&mut self) { self.leader = ::std::option::Option::None } -#[inline] pub fn set_leader(&mut self, v: super :: metapb :: Peer) { self.leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_leader(&self) -> &super :: metapb :: Peer { match self.leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_leader(&mut self) -> &mut super :: metapb :: Peer { if self.leader.is_none() { - self.leader = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.leader.as_mut().unwrap() } -#[inline] pub fn take_leader(&mut self) -> super :: metapb :: Peer { self.leader.take().unwrap_or_else(super :: metapb :: Peer::default) } -} -impl ::protobuf::Clear for RegionLeaderResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionLeaderResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionLeaderResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionLeaderResponse = RegionLeaderResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionLeaderResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_leader(&self) -> bool { + self.leader.is_some() + } + #[inline] + pub fn clear_leader(&mut self) { + self.leader = ::std::option::Option::None + } + #[inline] + pub fn set_leader(&mut self, v: super::metapb::Peer) { + self.leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_leader(&self) -> &super::metapb::Peer { + match self.leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_leader(&mut self) -> &mut super::metapb::Peer { + if self.leader.is_none() { + self.leader = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.leader.as_mut().unwrap() + } + #[inline] + pub fn take_leader(&mut self) -> super::metapb::Peer { + self.leader + .take() + .unwrap_or_else(super::metapb::Peer::default) + } +} +impl ::protobuf::Clear for RegionLeaderResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionLeaderResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionLeaderResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionLeaderResponse = RegionLeaderResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionDetailRequest { -pub fn new_() -> RegionDetailRequest { ::std::default::Default::default() } -} -impl ::protobuf::Clear for RegionDetailRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionDetailRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionDetailRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionDetailRequest = RegionDetailRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionDetailRequest { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for RegionDetailRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionDetailRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionDetailRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionDetailRequest = RegionDetailRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RegionDetailResponse { -pub fn new_() -> RegionDetailResponse { ::std::default::Default::default() } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_leader(&self) -> bool { self.leader.is_some() } -#[inline] pub fn clear_leader(&mut self) { self.leader = ::std::option::Option::None } -#[inline] pub fn set_leader(&mut self, v: super :: metapb :: Peer) { self.leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_leader(&self) -> &super :: metapb :: Peer { match self.leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_leader(&mut self) -> &mut super :: metapb :: Peer { if self.leader.is_none() { - self.leader = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.leader.as_mut().unwrap() } -#[inline] pub fn take_leader(&mut self) -> super :: metapb :: Peer { self.leader.take().unwrap_or_else(super :: metapb :: Peer::default) } -} -impl ::protobuf::Clear for RegionDetailResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionDetailResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionDetailResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionDetailResponse = RegionDetailResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RegionDetailResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_leader(&self) -> bool { + self.leader.is_some() + } + #[inline] + pub fn clear_leader(&mut self) { + self.leader = ::std::option::Option::None + } + #[inline] + pub fn set_leader(&mut self, v: super::metapb::Peer) { + self.leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_leader(&self) -> &super::metapb::Peer { + match self.leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_leader(&mut self) -> &mut super::metapb::Peer { + if self.leader.is_none() { + self.leader = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.leader.as_mut().unwrap() + } + #[inline] + pub fn take_leader(&mut self) -> super::metapb::Peer { + self.leader + .take() + .unwrap_or_else(super::metapb::Peer::default) + } +} +impl ::protobuf::Clear for RegionDetailResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RegionDetailResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionDetailResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionDetailResponse = RegionDetailResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl StatusRequest { -pub fn new_() -> StatusRequest { ::std::default::Default::default() } -#[inline] pub fn clear_cmd_type(&mut self) { self.cmd_type = 0 } -#[inline] pub fn set_cmd_type_(&mut self, v: StatusCmdType) { self.cmd_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_cmd_type(&self) -> StatusCmdType { unsafe { ::std::mem::transmute::(self.cmd_type) } } -#[inline] pub fn has_region_leader(&self) -> bool { self.region_leader.is_some() } -#[inline] pub fn clear_region_leader(&mut self) { self.region_leader = ::std::option::Option::None } -#[inline] pub fn set_region_leader(&mut self, v: RegionLeaderRequest) { self.region_leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_leader(&self) -> &RegionLeaderRequest { match self.region_leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_leader(&mut self) -> &mut RegionLeaderRequest { if self.region_leader.is_none() { - self.region_leader = ::std::option::Option::Some(RegionLeaderRequest::default()); - } - self.region_leader.as_mut().unwrap() } -#[inline] pub fn take_region_leader(&mut self) -> RegionLeaderRequest { self.region_leader.take().unwrap_or_else(RegionLeaderRequest::default) } -#[inline] pub fn has_region_detail(&self) -> bool { self.region_detail.is_some() } -#[inline] pub fn clear_region_detail(&mut self) { self.region_detail = ::std::option::Option::None } -#[inline] pub fn set_region_detail(&mut self, v: RegionDetailRequest) { self.region_detail = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_detail(&self) -> &RegionDetailRequest { match self.region_detail.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_detail(&mut self) -> &mut RegionDetailRequest { if self.region_detail.is_none() { - self.region_detail = ::std::option::Option::Some(RegionDetailRequest::default()); - } - self.region_detail.as_mut().unwrap() } -#[inline] pub fn take_region_detail(&mut self) -> RegionDetailRequest { self.region_detail.take().unwrap_or_else(RegionDetailRequest::default) } -} -impl ::protobuf::Clear for StatusRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for StatusRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StatusRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: StatusRequest = StatusRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> StatusRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cmd_type(&mut self) { + self.cmd_type = 0 + } + #[inline] + pub fn set_cmd_type_(&mut self, v: StatusCmdType) { + self.cmd_type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_cmd_type(&self) -> StatusCmdType { + unsafe { ::std::mem::transmute::(self.cmd_type) } + } + #[inline] + pub fn has_region_leader(&self) -> bool { + self.region_leader.is_some() + } + #[inline] + pub fn clear_region_leader(&mut self) { + self.region_leader = ::std::option::Option::None + } + #[inline] + pub fn set_region_leader(&mut self, v: RegionLeaderRequest) { + self.region_leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_leader(&self) -> &RegionLeaderRequest { + match self.region_leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_leader(&mut self) -> &mut RegionLeaderRequest { + if self.region_leader.is_none() { + self.region_leader = ::std::option::Option::Some(RegionLeaderRequest::default()); + } + self.region_leader.as_mut().unwrap() + } + #[inline] + pub fn take_region_leader(&mut self) -> RegionLeaderRequest { + self.region_leader + .take() + .unwrap_or_else(RegionLeaderRequest::default) + } + #[inline] + pub fn has_region_detail(&self) -> bool { + self.region_detail.is_some() + } + #[inline] + pub fn clear_region_detail(&mut self) { + self.region_detail = ::std::option::Option::None + } + #[inline] + pub fn set_region_detail(&mut self, v: RegionDetailRequest) { + self.region_detail = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_detail(&self) -> &RegionDetailRequest { + match self.region_detail.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_detail(&mut self) -> &mut RegionDetailRequest { + if self.region_detail.is_none() { + self.region_detail = ::std::option::Option::Some(RegionDetailRequest::default()); + } + self.region_detail.as_mut().unwrap() + } + #[inline] + pub fn take_region_detail(&mut self) -> RegionDetailRequest { + self.region_detail + .take() + .unwrap_or_else(RegionDetailRequest::default) + } +} +impl ::protobuf::Clear for StatusRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for StatusRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StatusRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: StatusRequest = StatusRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl StatusResponse { -pub fn new_() -> StatusResponse { ::std::default::Default::default() } -#[inline] pub fn clear_cmd_type(&mut self) { self.cmd_type = 0 } -#[inline] pub fn set_cmd_type_(&mut self, v: StatusCmdType) { self.cmd_type = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_cmd_type(&self) -> StatusCmdType { unsafe { ::std::mem::transmute::(self.cmd_type) } } -#[inline] pub fn has_region_leader(&self) -> bool { self.region_leader.is_some() } -#[inline] pub fn clear_region_leader(&mut self) { self.region_leader = ::std::option::Option::None } -#[inline] pub fn set_region_leader(&mut self, v: RegionLeaderResponse) { self.region_leader = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_leader(&self) -> &RegionLeaderResponse { match self.region_leader.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_leader(&mut self) -> &mut RegionLeaderResponse { if self.region_leader.is_none() { - self.region_leader = ::std::option::Option::Some(RegionLeaderResponse::default()); - } - self.region_leader.as_mut().unwrap() } -#[inline] pub fn take_region_leader(&mut self) -> RegionLeaderResponse { self.region_leader.take().unwrap_or_else(RegionLeaderResponse::default) } -#[inline] pub fn has_region_detail(&self) -> bool { self.region_detail.is_some() } -#[inline] pub fn clear_region_detail(&mut self) { self.region_detail = ::std::option::Option::None } -#[inline] pub fn set_region_detail(&mut self, v: RegionDetailResponse) { self.region_detail = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_detail(&self) -> &RegionDetailResponse { match self.region_detail.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_detail(&mut self) -> &mut RegionDetailResponse { if self.region_detail.is_none() { - self.region_detail = ::std::option::Option::Some(RegionDetailResponse::default()); - } - self.region_detail.as_mut().unwrap() } -#[inline] pub fn take_region_detail(&mut self) -> RegionDetailResponse { self.region_detail.take().unwrap_or_else(RegionDetailResponse::default) } -} -impl ::protobuf::Clear for StatusResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for StatusResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StatusResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: StatusResponse = StatusResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> StatusResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cmd_type(&mut self) { + self.cmd_type = 0 + } + #[inline] + pub fn set_cmd_type_(&mut self, v: StatusCmdType) { + self.cmd_type = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_cmd_type(&self) -> StatusCmdType { + unsafe { ::std::mem::transmute::(self.cmd_type) } + } + #[inline] + pub fn has_region_leader(&self) -> bool { + self.region_leader.is_some() + } + #[inline] + pub fn clear_region_leader(&mut self) { + self.region_leader = ::std::option::Option::None + } + #[inline] + pub fn set_region_leader(&mut self, v: RegionLeaderResponse) { + self.region_leader = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_leader(&self) -> &RegionLeaderResponse { + match self.region_leader.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_leader(&mut self) -> &mut RegionLeaderResponse { + if self.region_leader.is_none() { + self.region_leader = ::std::option::Option::Some(RegionLeaderResponse::default()); + } + self.region_leader.as_mut().unwrap() + } + #[inline] + pub fn take_region_leader(&mut self) -> RegionLeaderResponse { + self.region_leader + .take() + .unwrap_or_else(RegionLeaderResponse::default) + } + #[inline] + pub fn has_region_detail(&self) -> bool { + self.region_detail.is_some() + } + #[inline] + pub fn clear_region_detail(&mut self) { + self.region_detail = ::std::option::Option::None + } + #[inline] + pub fn set_region_detail(&mut self, v: RegionDetailResponse) { + self.region_detail = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_detail(&self) -> &RegionDetailResponse { + match self.region_detail.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_detail(&mut self) -> &mut RegionDetailResponse { + if self.region_detail.is_none() { + self.region_detail = ::std::option::Option::Some(RegionDetailResponse::default()); + } + self.region_detail.as_mut().unwrap() + } + #[inline] + pub fn take_region_detail(&mut self) -> RegionDetailResponse { + self.region_detail + .take() + .unwrap_or_else(RegionDetailResponse::default) + } +} +impl ::protobuf::Clear for StatusResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for StatusResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StatusResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: StatusResponse = StatusResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftRequestHeader { -pub fn new_() -> RaftRequestHeader { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn has_peer(&self) -> bool { self.peer.is_some() } -#[inline] pub fn clear_peer(&mut self) { self.peer = ::std::option::Option::None } -#[inline] pub fn set_peer(&mut self, v: super :: metapb :: Peer) { self.peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_peer(&self) -> &super :: metapb :: Peer { match self.peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_peer(&mut self) -> &mut super :: metapb :: Peer { if self.peer.is_none() { - self.peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.peer.as_mut().unwrap() } -#[inline] pub fn take_peer(&mut self) -> super :: metapb :: Peer { self.peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn clear_read_quorum(&mut self) { self.read_quorum = false } -#[inline] pub fn set_read_quorum(&mut self, v: bool) { self.read_quorum = v; } -#[inline] pub fn get_read_quorum(&self) -> bool { self.read_quorum } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -#[inline] pub fn has_region_epoch(&self) -> bool { self.region_epoch.is_some() } -#[inline] pub fn clear_region_epoch(&mut self) { self.region_epoch = ::std::option::Option::None } -#[inline] pub fn set_region_epoch(&mut self, v: super :: metapb :: RegionEpoch) { self.region_epoch = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_epoch(&self) -> &super :: metapb :: RegionEpoch { match self.region_epoch.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_epoch(&mut self) -> &mut super :: metapb :: RegionEpoch { if self.region_epoch.is_none() { - self.region_epoch = ::std::option::Option::Some(super :: metapb :: RegionEpoch::default()); - } - self.region_epoch.as_mut().unwrap() } -#[inline] pub fn take_region_epoch(&mut self) -> super :: metapb :: RegionEpoch { self.region_epoch.take().unwrap_or_else(super :: metapb :: RegionEpoch::default) } -#[inline] pub fn clear_term(&mut self) { self.term = 0 } -#[inline] pub fn set_term(&mut self, v: u64) { self.term = v; } -#[inline] pub fn get_term(&self) -> u64 { self.term } -#[inline] pub fn clear_sync_log(&mut self) { self.sync_log = false } -#[inline] pub fn set_sync_log(&mut self, v: bool) { self.sync_log = v; } -#[inline] pub fn get_sync_log(&self) -> bool { self.sync_log } -} -impl ::protobuf::Clear for RaftRequestHeader {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftRequestHeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftRequestHeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftRequestHeader = RaftRequestHeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RaftRequestHeader { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn has_peer(&self) -> bool { + self.peer.is_some() + } + #[inline] + pub fn clear_peer(&mut self) { + self.peer = ::std::option::Option::None + } + #[inline] + pub fn set_peer(&mut self, v: super::metapb::Peer) { + self.peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_peer(&self) -> &super::metapb::Peer { + match self.peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_peer(&mut self) -> &mut super::metapb::Peer { + if self.peer.is_none() { + self.peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.peer.as_mut().unwrap() + } + #[inline] + pub fn take_peer(&mut self) -> super::metapb::Peer { + self.peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn clear_read_quorum(&mut self) { + self.read_quorum = false + } + #[inline] + pub fn set_read_quorum(&mut self, v: bool) { + self.read_quorum = v; + } + #[inline] + pub fn get_read_quorum(&self) -> bool { + self.read_quorum + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_region_epoch(&self) -> bool { + self.region_epoch.is_some() + } + #[inline] + pub fn clear_region_epoch(&mut self) { + self.region_epoch = ::std::option::Option::None + } + #[inline] + pub fn set_region_epoch(&mut self, v: super::metapb::RegionEpoch) { + self.region_epoch = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_epoch(&self) -> &super::metapb::RegionEpoch { + match self.region_epoch.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_epoch(&mut self) -> &mut super::metapb::RegionEpoch { + if self.region_epoch.is_none() { + self.region_epoch = ::std::option::Option::Some(super::metapb::RegionEpoch::default()); + } + self.region_epoch.as_mut().unwrap() + } + #[inline] + pub fn take_region_epoch(&mut self) -> super::metapb::RegionEpoch { + self.region_epoch + .take() + .unwrap_or_else(super::metapb::RegionEpoch::default) + } + #[inline] + pub fn clear_term(&mut self) { + self.term = 0 + } + #[inline] + pub fn set_term(&mut self, v: u64) { + self.term = v; + } + #[inline] + pub fn get_term(&self) -> u64 { + self.term + } + #[inline] + pub fn clear_sync_log(&mut self) { + self.sync_log = false + } + #[inline] + pub fn set_sync_log(&mut self, v: bool) { + self.sync_log = v; + } + #[inline] + pub fn get_sync_log(&self) -> bool { + self.sync_log + } +} +impl ::protobuf::Clear for RaftRequestHeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftRequestHeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftRequestHeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftRequestHeader = RaftRequestHeader::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftResponseHeader { -pub fn new_() -> RaftResponseHeader { ::std::default::Default::default() } -#[inline] pub fn has_error(&self) -> bool { self.error.is_some() } -#[inline] pub fn clear_error(&mut self) { self.error = ::std::option::Option::None } -#[inline] pub fn set_error(&mut self, v: super :: errorpb :: Error) { self.error = ::std::option::Option::Some(v); } -#[inline] pub fn get_error(&self) -> &super :: errorpb :: Error { match self.error.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_error(&mut self) -> &mut super :: errorpb :: Error { if self.error.is_none() { - self.error = ::std::option::Option::Some(super :: errorpb :: Error::default()); - } - self.error.as_mut().unwrap() } -#[inline] pub fn take_error(&mut self) -> super :: errorpb :: Error { self.error.take().unwrap_or_else(super :: errorpb :: Error::default) } -#[inline] pub fn clear_uuid(&mut self) { self.uuid.clear(); } -#[inline] pub fn set_uuid(&mut self, v: std :: vec :: Vec < u8 >) { self.uuid = v; } -#[inline] pub fn get_uuid(&self) -> &[u8] { &self.uuid } -#[inline] pub fn mut_uuid(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.uuid } -#[inline] pub fn take_uuid(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) } -#[inline] pub fn clear_current_term(&mut self) { self.current_term = 0 } -#[inline] pub fn set_current_term(&mut self, v: u64) { self.current_term = v; } -#[inline] pub fn get_current_term(&self) -> u64 { self.current_term } -} -impl ::protobuf::Clear for RaftResponseHeader {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftResponseHeader {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftResponseHeader { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftResponseHeader = RaftResponseHeader::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RaftResponseHeader { + ::std::default::Default::default() + } + #[inline] + pub fn has_error(&self) -> bool { + self.error.is_some() + } + #[inline] + pub fn clear_error(&mut self) { + self.error = ::std::option::Option::None + } + #[inline] + pub fn set_error(&mut self, v: super::errorpb::Error) { + self.error = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_error(&self) -> &super::errorpb::Error { + match self.error.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_error(&mut self) -> &mut super::errorpb::Error { + if self.error.is_none() { + self.error = ::std::option::Option::Some(super::errorpb::Error::default()); + } + self.error.as_mut().unwrap() + } + #[inline] + pub fn take_error(&mut self) -> super::errorpb::Error { + self.error + .take() + .unwrap_or_else(super::errorpb::Error::default) + } + #[inline] + pub fn clear_uuid(&mut self) { + self.uuid.clear(); + } + #[inline] + pub fn set_uuid(&mut self, v: std::vec::Vec) { + self.uuid = v; + } + #[inline] + pub fn get_uuid(&self) -> &[u8] { + &self.uuid + } + #[inline] + pub fn mut_uuid(&mut self) -> &mut std::vec::Vec { + &mut self.uuid + } + #[inline] + pub fn take_uuid(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.uuid, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_current_term(&mut self) { + self.current_term = 0 + } + #[inline] + pub fn set_current_term(&mut self, v: u64) { + self.current_term = v; + } + #[inline] + pub fn get_current_term(&self) -> u64 { + self.current_term + } +} +impl ::protobuf::Clear for RaftResponseHeader { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftResponseHeader { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftResponseHeader { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftResponseHeader = RaftResponseHeader::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftCmdRequest { -pub fn new_() -> RaftCmdRequest { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RaftRequestHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RaftRequestHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RaftRequestHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RaftRequestHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RaftRequestHeader { self.header.take().unwrap_or_else(RaftRequestHeader::default) } -#[inline] pub fn clear_requests(&mut self) { self.requests.clear(); } -#[inline] pub fn set_requests(&mut self, v: :: std :: vec :: Vec < Request >) { self.requests = v; } -#[inline] pub fn get_requests(&self) -> &:: std :: vec :: Vec < Request > { &self.requests } -#[inline] pub fn mut_requests(&mut self) -> &mut :: std :: vec :: Vec < Request > { &mut self.requests } -#[inline] pub fn take_requests(&mut self) -> :: std :: vec :: Vec < Request > { ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) } -#[inline] pub fn has_admin_request(&self) -> bool { self.admin_request.is_some() } -#[inline] pub fn clear_admin_request(&mut self) { self.admin_request = ::std::option::Option::None } -#[inline] pub fn set_admin_request(&mut self, v: AdminRequest) { self.admin_request = ::std::option::Option::Some(v); } -#[inline] pub fn get_admin_request(&self) -> &AdminRequest { match self.admin_request.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_admin_request(&mut self) -> &mut AdminRequest { if self.admin_request.is_none() { - self.admin_request = ::std::option::Option::Some(AdminRequest::default()); - } - self.admin_request.as_mut().unwrap() } -#[inline] pub fn take_admin_request(&mut self) -> AdminRequest { self.admin_request.take().unwrap_or_else(AdminRequest::default) } -#[inline] pub fn has_status_request(&self) -> bool { self.status_request.is_some() } -#[inline] pub fn clear_status_request(&mut self) { self.status_request = ::std::option::Option::None } -#[inline] pub fn set_status_request(&mut self, v: StatusRequest) { self.status_request = ::std::option::Option::Some(v); } -#[inline] pub fn get_status_request(&self) -> &StatusRequest { match self.status_request.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_status_request(&mut self) -> &mut StatusRequest { if self.status_request.is_none() { - self.status_request = ::std::option::Option::Some(StatusRequest::default()); - } - self.status_request.as_mut().unwrap() } -#[inline] pub fn take_status_request(&mut self) -> StatusRequest { self.status_request.take().unwrap_or_else(StatusRequest::default) } -} -impl ::protobuf::Clear for RaftCmdRequest {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftCmdRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftCmdRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftCmdRequest = RaftCmdRequest::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RaftCmdRequest { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RaftRequestHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RaftRequestHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RaftRequestHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RaftRequestHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RaftRequestHeader { + self.header + .take() + .unwrap_or_else(RaftRequestHeader::default) + } + #[inline] + pub fn clear_requests(&mut self) { + self.requests.clear(); + } + #[inline] + pub fn set_requests(&mut self, v: ::std::vec::Vec) { + self.requests = v; + } + #[inline] + pub fn get_requests(&self) -> &::std::vec::Vec { + &self.requests + } + #[inline] + pub fn mut_requests(&mut self) -> &mut ::std::vec::Vec { + &mut self.requests + } + #[inline] + pub fn take_requests(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_admin_request(&self) -> bool { + self.admin_request.is_some() + } + #[inline] + pub fn clear_admin_request(&mut self) { + self.admin_request = ::std::option::Option::None + } + #[inline] + pub fn set_admin_request(&mut self, v: AdminRequest) { + self.admin_request = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_admin_request(&self) -> &AdminRequest { + match self.admin_request.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_admin_request(&mut self) -> &mut AdminRequest { + if self.admin_request.is_none() { + self.admin_request = ::std::option::Option::Some(AdminRequest::default()); + } + self.admin_request.as_mut().unwrap() + } + #[inline] + pub fn take_admin_request(&mut self) -> AdminRequest { + self.admin_request + .take() + .unwrap_or_else(AdminRequest::default) + } + #[inline] + pub fn has_status_request(&self) -> bool { + self.status_request.is_some() + } + #[inline] + pub fn clear_status_request(&mut self) { + self.status_request = ::std::option::Option::None + } + #[inline] + pub fn set_status_request(&mut self, v: StatusRequest) { + self.status_request = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_status_request(&self) -> &StatusRequest { + match self.status_request.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_status_request(&mut self) -> &mut StatusRequest { + if self.status_request.is_none() { + self.status_request = ::std::option::Option::Some(StatusRequest::default()); + } + self.status_request.as_mut().unwrap() + } + #[inline] + pub fn take_status_request(&mut self) -> StatusRequest { + self.status_request + .take() + .unwrap_or_else(StatusRequest::default) + } +} +impl ::protobuf::Clear for RaftCmdRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftCmdRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftCmdRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftCmdRequest = RaftCmdRequest::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftCmdResponse { -pub fn new_() -> RaftCmdResponse { ::std::default::Default::default() } -#[inline] pub fn has_header(&self) -> bool { self.header.is_some() } -#[inline] pub fn clear_header(&mut self) { self.header = ::std::option::Option::None } -#[inline] pub fn set_header(&mut self, v: RaftResponseHeader) { self.header = ::std::option::Option::Some(v); } -#[inline] pub fn get_header(&self) -> &RaftResponseHeader { match self.header.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_header(&mut self) -> &mut RaftResponseHeader { if self.header.is_none() { - self.header = ::std::option::Option::Some(RaftResponseHeader::default()); - } - self.header.as_mut().unwrap() } -#[inline] pub fn take_header(&mut self) -> RaftResponseHeader { self.header.take().unwrap_or_else(RaftResponseHeader::default) } -#[inline] pub fn clear_responses(&mut self) { self.responses.clear(); } -#[inline] pub fn set_responses(&mut self, v: :: std :: vec :: Vec < Response >) { self.responses = v; } -#[inline] pub fn get_responses(&self) -> &:: std :: vec :: Vec < Response > { &self.responses } -#[inline] pub fn mut_responses(&mut self) -> &mut :: std :: vec :: Vec < Response > { &mut self.responses } -#[inline] pub fn take_responses(&mut self) -> :: std :: vec :: Vec < Response > { ::std::mem::replace(&mut self.responses, ::std::vec::Vec::new()) } -#[inline] pub fn has_admin_response(&self) -> bool { self.admin_response.is_some() } -#[inline] pub fn clear_admin_response(&mut self) { self.admin_response = ::std::option::Option::None } -#[inline] pub fn set_admin_response(&mut self, v: AdminResponse) { self.admin_response = ::std::option::Option::Some(v); } -#[inline] pub fn get_admin_response(&self) -> &AdminResponse { match self.admin_response.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_admin_response(&mut self) -> &mut AdminResponse { if self.admin_response.is_none() { - self.admin_response = ::std::option::Option::Some(AdminResponse::default()); - } - self.admin_response.as_mut().unwrap() } -#[inline] pub fn take_admin_response(&mut self) -> AdminResponse { self.admin_response.take().unwrap_or_else(AdminResponse::default) } -#[inline] pub fn has_status_response(&self) -> bool { self.status_response.is_some() } -#[inline] pub fn clear_status_response(&mut self) { self.status_response = ::std::option::Option::None } -#[inline] pub fn set_status_response(&mut self, v: StatusResponse) { self.status_response = ::std::option::Option::Some(v); } -#[inline] pub fn get_status_response(&self) -> &StatusResponse { match self.status_response.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_status_response(&mut self) -> &mut StatusResponse { if self.status_response.is_none() { - self.status_response = ::std::option::Option::Some(StatusResponse::default()); - } - self.status_response.as_mut().unwrap() } -#[inline] pub fn take_status_response(&mut self) -> StatusResponse { self.status_response.take().unwrap_or_else(StatusResponse::default) } -} -impl ::protobuf::Clear for RaftCmdResponse {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftCmdResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftCmdResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftCmdResponse = RaftCmdResponse::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) - } + pub fn new_() -> RaftCmdResponse { + ::std::default::Default::default() + } + #[inline] + pub fn has_header(&self) -> bool { + self.header.is_some() + } + #[inline] + pub fn clear_header(&mut self) { + self.header = ::std::option::Option::None + } + #[inline] + pub fn set_header(&mut self, v: RaftResponseHeader) { + self.header = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_header(&self) -> &RaftResponseHeader { + match self.header.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_header(&mut self) -> &mut RaftResponseHeader { + if self.header.is_none() { + self.header = ::std::option::Option::Some(RaftResponseHeader::default()); + } + self.header.as_mut().unwrap() + } + #[inline] + pub fn take_header(&mut self) -> RaftResponseHeader { + self.header + .take() + .unwrap_or_else(RaftResponseHeader::default) + } + #[inline] + pub fn clear_responses(&mut self) { + self.responses.clear(); + } + #[inline] + pub fn set_responses(&mut self, v: ::std::vec::Vec) { + self.responses = v; + } + #[inline] + pub fn get_responses(&self) -> &::std::vec::Vec { + &self.responses + } + #[inline] + pub fn mut_responses(&mut self) -> &mut ::std::vec::Vec { + &mut self.responses + } + #[inline] + pub fn take_responses(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.responses, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_admin_response(&self) -> bool { + self.admin_response.is_some() + } + #[inline] + pub fn clear_admin_response(&mut self) { + self.admin_response = ::std::option::Option::None + } + #[inline] + pub fn set_admin_response(&mut self, v: AdminResponse) { + self.admin_response = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_admin_response(&self) -> &AdminResponse { + match self.admin_response.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_admin_response(&mut self) -> &mut AdminResponse { + if self.admin_response.is_none() { + self.admin_response = ::std::option::Option::Some(AdminResponse::default()); + } + self.admin_response.as_mut().unwrap() + } + #[inline] + pub fn take_admin_response(&mut self) -> AdminResponse { + self.admin_response + .take() + .unwrap_or_else(AdminResponse::default) + } + #[inline] + pub fn has_status_response(&self) -> bool { + self.status_response.is_some() + } + #[inline] + pub fn clear_status_response(&mut self) { + self.status_response = ::std::option::Option::None + } + #[inline] + pub fn set_status_response(&mut self, v: StatusResponse) { + self.status_response = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_status_response(&self) -> &StatusResponse { + match self.status_response.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_status_response(&mut self) -> &mut StatusResponse { + if self.status_response.is_none() { + self.status_response = ::std::option::Option::Some(StatusResponse::default()); + } + self.status_response.as_mut().unwrap() + } + #[inline] + pub fn take_status_response(&mut self) -> StatusResponse { + self.status_response + .take() + .unwrap_or_else(StatusResponse::default) + } +} +impl ::protobuf::Clear for RaftCmdResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftCmdResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftCmdResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftCmdResponse = RaftCmdResponse::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl CmdType { -pub fn values() -> &'static [Self] { -static VALUES: &'static [CmdType] = &[ -CmdType::Invalid, -CmdType::Get, -CmdType::Put, -CmdType::Delete, -CmdType::Snap, -CmdType::Prewrite, -CmdType::DeleteRange, -CmdType::IngestSst, -CmdType::ReadIndex, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [CmdType] = &[ + CmdType::Invalid, + CmdType::Get, + CmdType::Put, + CmdType::Delete, + CmdType::Snap, + CmdType::Prewrite, + CmdType::DeleteRange, + CmdType::IngestSst, + CmdType::ReadIndex, + ]; + VALUES + } } impl AdminCmdType { -pub fn values() -> &'static [Self] { -static VALUES: &'static [AdminCmdType] = &[ -AdminCmdType::InvalidAdmin, -AdminCmdType::ChangePeer, -AdminCmdType::Split, -AdminCmdType::CompactLog, -AdminCmdType::TransferLeader, -AdminCmdType::ComputeHash, -AdminCmdType::VerifyHash, -AdminCmdType::PrepareMerge, -AdminCmdType::CommitMerge, -AdminCmdType::RollbackMerge, -AdminCmdType::BatchSplit, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [AdminCmdType] = &[ + AdminCmdType::InvalidAdmin, + AdminCmdType::ChangePeer, + AdminCmdType::Split, + AdminCmdType::CompactLog, + AdminCmdType::TransferLeader, + AdminCmdType::ComputeHash, + AdminCmdType::VerifyHash, + AdminCmdType::PrepareMerge, + AdminCmdType::CommitMerge, + AdminCmdType::RollbackMerge, + AdminCmdType::BatchSplit, + ]; + VALUES + } } impl StatusCmdType { -pub fn values() -> &'static [Self] { -static VALUES: &'static [StatusCmdType] = &[ -StatusCmdType::InvalidStatus, -StatusCmdType::RegionLeader, -StatusCmdType::RegionDetail, -]; -VALUES -} + pub fn values() -> &'static [Self] { + static VALUES: &'static [StatusCmdType] = &[ + StatusCmdType::InvalidStatus, + StatusCmdType::RegionLeader, + StatusCmdType::RegionDetail, + ]; + VALUES + } } diff --git a/src/prost/wrapper_raft_serverpb.rs b/src/prost/wrapper_raft_serverpb.rs index 4920160e0..9b2a0b83b 100644 --- a/src/prost/wrapper_raft_serverpb.rs +++ b/src/prost/wrapper_raft_serverpb.rs @@ -1,709 +1,1686 @@ // Generated file, please don't edit manually. impl RaftMessage { -pub fn new_() -> RaftMessage { ::std::default::Default::default() } -#[inline] pub fn clear_region_id(&mut self) { self.region_id = 0 } -#[inline] pub fn set_region_id(&mut self, v: u64) { self.region_id = v; } -#[inline] pub fn get_region_id(&self) -> u64 { self.region_id } -#[inline] pub fn has_from_peer(&self) -> bool { self.from_peer.is_some() } -#[inline] pub fn clear_from_peer(&mut self) { self.from_peer = ::std::option::Option::None } -#[inline] pub fn set_from_peer(&mut self, v: super :: metapb :: Peer) { self.from_peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_from_peer(&self) -> &super :: metapb :: Peer { match self.from_peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_from_peer(&mut self) -> &mut super :: metapb :: Peer { if self.from_peer.is_none() { - self.from_peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.from_peer.as_mut().unwrap() } -#[inline] pub fn take_from_peer(&mut self) -> super :: metapb :: Peer { self.from_peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn has_to_peer(&self) -> bool { self.to_peer.is_some() } -#[inline] pub fn clear_to_peer(&mut self) { self.to_peer = ::std::option::Option::None } -#[inline] pub fn set_to_peer(&mut self, v: super :: metapb :: Peer) { self.to_peer = ::std::option::Option::Some(v); } -#[inline] pub fn get_to_peer(&self) -> &super :: metapb :: Peer { match self.to_peer.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_to_peer(&mut self) -> &mut super :: metapb :: Peer { if self.to_peer.is_none() { - self.to_peer = ::std::option::Option::Some(super :: metapb :: Peer::default()); - } - self.to_peer.as_mut().unwrap() } -#[inline] pub fn take_to_peer(&mut self) -> super :: metapb :: Peer { self.to_peer.take().unwrap_or_else(super :: metapb :: Peer::default) } -#[inline] pub fn has_message(&self) -> bool { self.message.is_some() } -#[inline] pub fn clear_message(&mut self) { self.message = ::std::option::Option::None } -#[inline] pub fn set_message(&mut self, v: super :: eraftpb :: Message) { self.message = ::std::option::Option::Some(v); } -#[inline] pub fn get_message(&self) -> &super :: eraftpb :: Message { match self.message.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_message(&mut self) -> &mut super :: eraftpb :: Message { if self.message.is_none() { - self.message = ::std::option::Option::Some(super :: eraftpb :: Message::default()); - } - self.message.as_mut().unwrap() } -#[inline] pub fn take_message(&mut self) -> super :: eraftpb :: Message { self.message.take().unwrap_or_else(super :: eraftpb :: Message::default) } -#[inline] pub fn has_region_epoch(&self) -> bool { self.region_epoch.is_some() } -#[inline] pub fn clear_region_epoch(&mut self) { self.region_epoch = ::std::option::Option::None } -#[inline] pub fn set_region_epoch(&mut self, v: super :: metapb :: RegionEpoch) { self.region_epoch = ::std::option::Option::Some(v); } -#[inline] pub fn get_region_epoch(&self) -> &super :: metapb :: RegionEpoch { match self.region_epoch.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region_epoch(&mut self) -> &mut super :: metapb :: RegionEpoch { if self.region_epoch.is_none() { - self.region_epoch = ::std::option::Option::Some(super :: metapb :: RegionEpoch::default()); - } - self.region_epoch.as_mut().unwrap() } -#[inline] pub fn take_region_epoch(&mut self) -> super :: metapb :: RegionEpoch { self.region_epoch.take().unwrap_or_else(super :: metapb :: RegionEpoch::default) } -#[inline] pub fn clear_is_tombstone(&mut self) { self.is_tombstone = false } -#[inline] pub fn set_is_tombstone(&mut self, v: bool) { self.is_tombstone = v; } -#[inline] pub fn get_is_tombstone(&self) -> bool { self.is_tombstone } -#[inline] pub fn clear_start_key(&mut self) { self.start_key.clear(); } -#[inline] pub fn set_start_key(&mut self, v: std :: vec :: Vec < u8 >) { self.start_key = v; } -#[inline] pub fn get_start_key(&self) -> &[u8] { &self.start_key } -#[inline] pub fn mut_start_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.start_key } -#[inline] pub fn take_start_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_end_key(&mut self) { self.end_key.clear(); } -#[inline] pub fn set_end_key(&mut self, v: std :: vec :: Vec < u8 >) { self.end_key = v; } -#[inline] pub fn get_end_key(&self) -> &[u8] { &self.end_key } -#[inline] pub fn mut_end_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.end_key } -#[inline] pub fn take_end_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) } -#[inline] pub fn has_merge_target(&self) -> bool { self.merge_target.is_some() } -#[inline] pub fn clear_merge_target(&mut self) { self.merge_target = ::std::option::Option::None } -#[inline] pub fn set_merge_target(&mut self, v: super :: metapb :: Region) { self.merge_target = ::std::option::Option::Some(v); } -#[inline] pub fn get_merge_target(&self) -> &super :: metapb :: Region { match self.merge_target.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_merge_target(&mut self) -> &mut super :: metapb :: Region { if self.merge_target.is_none() { - self.merge_target = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.merge_target.as_mut().unwrap() } -#[inline] pub fn take_merge_target(&mut self) -> super :: metapb :: Region { self.merge_target.take().unwrap_or_else(super :: metapb :: Region::default) } -} -impl ::protobuf::Clear for RaftMessage {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftMessage {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftMessage { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftMessage = RaftMessage::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> RaftMessage { + ::std::default::Default::default() + } + #[inline] + pub fn clear_region_id(&mut self) { + self.region_id = 0 + } + #[inline] + pub fn set_region_id(&mut self, v: u64) { + self.region_id = v; + } + #[inline] + pub fn get_region_id(&self) -> u64 { + self.region_id + } + #[inline] + pub fn has_from_peer(&self) -> bool { + self.from_peer.is_some() + } + #[inline] + pub fn clear_from_peer(&mut self) { + self.from_peer = ::std::option::Option::None + } + #[inline] + pub fn set_from_peer(&mut self, v: super::metapb::Peer) { + self.from_peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_from_peer(&self) -> &super::metapb::Peer { + match self.from_peer.as_ref() { + Some(v) => v, + None => ::default_instance(), } + } + #[inline] + pub fn mut_from_peer(&mut self) -> &mut super::metapb::Peer { + if self.from_peer.is_none() { + self.from_peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.from_peer.as_mut().unwrap() + } + #[inline] + pub fn take_from_peer(&mut self) -> super::metapb::Peer { + self.from_peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn has_to_peer(&self) -> bool { + self.to_peer.is_some() + } + #[inline] + pub fn clear_to_peer(&mut self) { + self.to_peer = ::std::option::Option::None + } + #[inline] + pub fn set_to_peer(&mut self, v: super::metapb::Peer) { + self.to_peer = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_to_peer(&self) -> &super::metapb::Peer { + match self.to_peer.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_to_peer(&mut self) -> &mut super::metapb::Peer { + if self.to_peer.is_none() { + self.to_peer = ::std::option::Option::Some(super::metapb::Peer::default()); + } + self.to_peer.as_mut().unwrap() + } + #[inline] + pub fn take_to_peer(&mut self) -> super::metapb::Peer { + self.to_peer + .take() + .unwrap_or_else(super::metapb::Peer::default) + } + #[inline] + pub fn has_message(&self) -> bool { + self.message.is_some() + } + #[inline] + pub fn clear_message(&mut self) { + self.message = ::std::option::Option::None + } + #[inline] + pub fn set_message(&mut self, v: super::eraftpb::Message) { + self.message = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_message(&self) -> &super::eraftpb::Message { + match self.message.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_message(&mut self) -> &mut super::eraftpb::Message { + if self.message.is_none() { + self.message = ::std::option::Option::Some(super::eraftpb::Message::default()); + } + self.message.as_mut().unwrap() + } + #[inline] + pub fn take_message(&mut self) -> super::eraftpb::Message { + self.message + .take() + .unwrap_or_else(super::eraftpb::Message::default) + } + #[inline] + pub fn has_region_epoch(&self) -> bool { + self.region_epoch.is_some() + } + #[inline] + pub fn clear_region_epoch(&mut self) { + self.region_epoch = ::std::option::Option::None + } + #[inline] + pub fn set_region_epoch(&mut self, v: super::metapb::RegionEpoch) { + self.region_epoch = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region_epoch(&self) -> &super::metapb::RegionEpoch { + match self.region_epoch.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_region_epoch(&mut self) -> &mut super::metapb::RegionEpoch { + if self.region_epoch.is_none() { + self.region_epoch = ::std::option::Option::Some(super::metapb::RegionEpoch::default()); + } + self.region_epoch.as_mut().unwrap() + } + #[inline] + pub fn take_region_epoch(&mut self) -> super::metapb::RegionEpoch { + self.region_epoch + .take() + .unwrap_or_else(super::metapb::RegionEpoch::default) + } + #[inline] + pub fn clear_is_tombstone(&mut self) { + self.is_tombstone = false + } + #[inline] + pub fn set_is_tombstone(&mut self, v: bool) { + self.is_tombstone = v; + } + #[inline] + pub fn get_is_tombstone(&self) -> bool { + self.is_tombstone + } + #[inline] + pub fn clear_start_key(&mut self) { + self.start_key.clear(); + } + #[inline] + pub fn set_start_key(&mut self, v: std::vec::Vec) { + self.start_key = v; + } + #[inline] + pub fn get_start_key(&self) -> &[u8] { + &self.start_key + } + #[inline] + pub fn mut_start_key(&mut self) -> &mut std::vec::Vec { + &mut self.start_key + } + #[inline] + pub fn take_start_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.start_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_end_key(&mut self) { + self.end_key.clear(); + } + #[inline] + pub fn set_end_key(&mut self, v: std::vec::Vec) { + self.end_key = v; + } + #[inline] + pub fn get_end_key(&self) -> &[u8] { + &self.end_key + } + #[inline] + pub fn mut_end_key(&mut self) -> &mut std::vec::Vec { + &mut self.end_key + } + #[inline] + pub fn take_end_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.end_key, ::std::vec::Vec::new()) + } + #[inline] + pub fn has_merge_target(&self) -> bool { + self.merge_target.is_some() + } + #[inline] + pub fn clear_merge_target(&mut self) { + self.merge_target = ::std::option::Option::None + } + #[inline] + pub fn set_merge_target(&mut self, v: super::metapb::Region) { + self.merge_target = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_merge_target(&self) -> &super::metapb::Region { + match self.merge_target.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_merge_target(&mut self) -> &mut super::metapb::Region { + if self.merge_target.is_none() { + self.merge_target = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.merge_target.as_mut().unwrap() + } + #[inline] + pub fn take_merge_target(&mut self) -> super::metapb::Region { + self.merge_target + .take() + .unwrap_or_else(super::metapb::Region::default) + } +} +impl ::protobuf::Clear for RaftMessage { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftMessage { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftMessage { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftMessage = RaftMessage::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftTruncatedState { -pub fn new_() -> RaftTruncatedState { ::std::default::Default::default() } -#[inline] pub fn clear_index(&mut self) { self.index = 0 } -#[inline] pub fn set_index(&mut self, v: u64) { self.index = v; } -#[inline] pub fn get_index(&self) -> u64 { self.index } -#[inline] pub fn clear_term(&mut self) { self.term = 0 } -#[inline] pub fn set_term(&mut self, v: u64) { self.term = v; } -#[inline] pub fn get_term(&self) -> u64 { self.term } -} -impl ::protobuf::Clear for RaftTruncatedState {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftTruncatedState {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftTruncatedState { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftTruncatedState = RaftTruncatedState::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> RaftTruncatedState { + ::std::default::Default::default() + } + #[inline] + pub fn clear_index(&mut self) { + self.index = 0 + } + #[inline] + pub fn set_index(&mut self, v: u64) { + self.index = v; + } + #[inline] + pub fn get_index(&self) -> u64 { + self.index + } + #[inline] + pub fn clear_term(&mut self) { + self.term = 0 + } + #[inline] + pub fn set_term(&mut self, v: u64) { + self.term = v; + } + #[inline] + pub fn get_term(&self) -> u64 { + self.term + } +} +impl ::protobuf::Clear for RaftTruncatedState { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftTruncatedState { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftTruncatedState { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftTruncatedState = RaftTruncatedState::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl SnapshotCfFile { -pub fn new_() -> SnapshotCfFile { ::std::default::Default::default() } -#[inline] pub fn clear_cf(&mut self) { self.cf.clear(); } -#[inline] pub fn set_cf(&mut self, v: std :: string :: String) { self.cf = v; } -#[inline] pub fn get_cf(&self) -> &str { &self.cf } -#[inline] pub fn mut_cf(&mut self) -> &mut std :: string :: String { &mut self.cf } -#[inline] pub fn take_cf(&mut self) -> std :: string :: String { ::std::mem::replace(&mut self.cf, ::std::string::String::new()) } -#[inline] pub fn clear_size(&mut self) { self.size = 0 } -#[inline] pub fn set_size(&mut self, v: u64) { self.size = v; } -#[inline] pub fn get_size(&self) -> u64 { self.size } -#[inline] pub fn clear_checksum(&mut self) { self.checksum = 0 } -#[inline] pub fn set_checksum(&mut self, v: u32) { self.checksum = v; } -#[inline] pub fn get_checksum(&self) -> u32 { self.checksum } -} -impl ::protobuf::Clear for SnapshotCfFile {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SnapshotCfFile {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapshotCfFile { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapshotCfFile = SnapshotCfFile::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> SnapshotCfFile { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf(&mut self) { + self.cf.clear(); + } + #[inline] + pub fn set_cf(&mut self, v: std::string::String) { + self.cf = v; + } + #[inline] + pub fn get_cf(&self) -> &str { + &self.cf + } + #[inline] + pub fn mut_cf(&mut self) -> &mut std::string::String { + &mut self.cf + } + #[inline] + pub fn take_cf(&mut self) -> std::string::String { + ::std::mem::replace(&mut self.cf, ::std::string::String::new()) + } + #[inline] + pub fn clear_size(&mut self) { + self.size = 0 + } + #[inline] + pub fn set_size(&mut self, v: u64) { + self.size = v; + } + #[inline] + pub fn get_size(&self) -> u64 { + self.size + } + #[inline] + pub fn clear_checksum(&mut self) { + self.checksum = 0 + } + #[inline] + pub fn set_checksum(&mut self, v: u32) { + self.checksum = v; + } + #[inline] + pub fn get_checksum(&self) -> u32 { + self.checksum + } +} +impl ::protobuf::Clear for SnapshotCfFile { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SnapshotCfFile { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapshotCfFile { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapshotCfFile = SnapshotCfFile::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SnapshotMeta { -pub fn new_() -> SnapshotMeta { ::std::default::Default::default() } -#[inline] pub fn clear_cf_files(&mut self) { self.cf_files.clear(); } -#[inline] pub fn set_cf_files(&mut self, v: :: std :: vec :: Vec < SnapshotCfFile >) { self.cf_files = v; } -#[inline] pub fn get_cf_files(&self) -> &:: std :: vec :: Vec < SnapshotCfFile > { &self.cf_files } -#[inline] pub fn mut_cf_files(&mut self) -> &mut :: std :: vec :: Vec < SnapshotCfFile > { &mut self.cf_files } -#[inline] pub fn take_cf_files(&mut self) -> :: std :: vec :: Vec < SnapshotCfFile > { ::std::mem::replace(&mut self.cf_files, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for SnapshotMeta {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SnapshotMeta {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapshotMeta { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapshotMeta = SnapshotMeta::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> SnapshotMeta { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cf_files(&mut self) { + self.cf_files.clear(); + } + #[inline] + pub fn set_cf_files(&mut self, v: ::std::vec::Vec) { + self.cf_files = v; + } + #[inline] + pub fn get_cf_files(&self) -> &::std::vec::Vec { + &self.cf_files + } + #[inline] + pub fn mut_cf_files(&mut self) -> &mut ::std::vec::Vec { + &mut self.cf_files + } + #[inline] + pub fn take_cf_files(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.cf_files, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for SnapshotMeta { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SnapshotMeta { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapshotMeta { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapshotMeta = SnapshotMeta::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl SnapshotChunk { -pub fn new_() -> SnapshotChunk { ::std::default::Default::default() } -#[inline] pub fn has_message(&self) -> bool { self.message.is_some() } -#[inline] pub fn clear_message(&mut self) { self.message = ::std::option::Option::None } -#[inline] pub fn set_message(&mut self, v: RaftMessage) { self.message = ::std::option::Option::Some(v); } -#[inline] pub fn get_message(&self) -> &RaftMessage { match self.message.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_message(&mut self) -> &mut RaftMessage { if self.message.is_none() { - self.message = ::std::option::Option::Some(RaftMessage::default()); - } - self.message.as_mut().unwrap() } -#[inline] pub fn take_message(&mut self) -> RaftMessage { self.message.take().unwrap_or_else(RaftMessage::default) } -#[inline] pub fn clear_data(&mut self) { self.data.clear(); } -#[inline] pub fn set_data(&mut self, v: std :: vec :: Vec < u8 >) { self.data = v; } -#[inline] pub fn get_data(&self) -> &[u8] { &self.data } -#[inline] pub fn mut_data(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.data } -#[inline] pub fn take_data(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for SnapshotChunk {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for SnapshotChunk {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static SnapshotChunk { - ::lazy_static::lazy_static! { - static ref INSTANCE: SnapshotChunk = SnapshotChunk::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> SnapshotChunk { + ::std::default::Default::default() + } + #[inline] + pub fn has_message(&self) -> bool { + self.message.is_some() + } + #[inline] + pub fn clear_message(&mut self) { + self.message = ::std::option::Option::None + } + #[inline] + pub fn set_message(&mut self, v: RaftMessage) { + self.message = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_message(&self) -> &RaftMessage { + match self.message.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_message(&mut self) -> &mut RaftMessage { + if self.message.is_none() { + self.message = ::std::option::Option::Some(RaftMessage::default()); + } + self.message.as_mut().unwrap() + } + #[inline] + pub fn take_message(&mut self) -> RaftMessage { + self.message.take().unwrap_or_else(RaftMessage::default) + } + #[inline] + pub fn clear_data(&mut self) { + self.data.clear(); + } + #[inline] + pub fn set_data(&mut self, v: std::vec::Vec) { + self.data = v; + } + #[inline] + pub fn get_data(&self) -> &[u8] { + &self.data + } + #[inline] + pub fn mut_data(&mut self) -> &mut std::vec::Vec { + &mut self.data + } + #[inline] + pub fn take_data(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for SnapshotChunk { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for SnapshotChunk { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static SnapshotChunk { + ::lazy_static::lazy_static! { + static ref INSTANCE: SnapshotChunk = SnapshotChunk::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl Done { -pub fn new_() -> Done { ::std::default::Default::default() } -} -impl ::protobuf::Clear for Done {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for Done {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static Done { - ::lazy_static::lazy_static! { - static ref INSTANCE: Done = Done::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> Done { + ::std::default::Default::default() + } +} +impl ::protobuf::Clear for Done { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for Done { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static Done { + ::lazy_static::lazy_static! { + static ref INSTANCE: Done = Done::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl KeyValue { -pub fn new_() -> KeyValue { ::std::default::Default::default() } -#[inline] pub fn clear_key(&mut self) { self.key.clear(); } -#[inline] pub fn set_key(&mut self, v: std :: vec :: Vec < u8 >) { self.key = v; } -#[inline] pub fn get_key(&self) -> &[u8] { &self.key } -#[inline] pub fn mut_key(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.key } -#[inline] pub fn take_key(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) } -#[inline] pub fn clear_value(&mut self) { self.value.clear(); } -#[inline] pub fn set_value(&mut self, v: std :: vec :: Vec < u8 >) { self.value = v; } -#[inline] pub fn get_value(&self) -> &[u8] { &self.value } -#[inline] pub fn mut_value(&mut self) -> &mut std :: vec :: Vec < u8 > { &mut self.value } -#[inline] pub fn take_value(&mut self) -> std :: vec :: Vec < u8 > { ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) } -} -impl ::protobuf::Clear for KeyValue {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for KeyValue {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static KeyValue { - ::lazy_static::lazy_static! { - static ref INSTANCE: KeyValue = KeyValue::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> KeyValue { + ::std::default::Default::default() + } + #[inline] + pub fn clear_key(&mut self) { + self.key.clear(); + } + #[inline] + pub fn set_key(&mut self, v: std::vec::Vec) { + self.key = v; + } + #[inline] + pub fn get_key(&self) -> &[u8] { + &self.key + } + #[inline] + pub fn mut_key(&mut self) -> &mut std::vec::Vec { + &mut self.key + } + #[inline] + pub fn take_key(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.key, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_value(&mut self) { + self.value.clear(); + } + #[inline] + pub fn set_value(&mut self, v: std::vec::Vec) { + self.value = v; + } + #[inline] + pub fn get_value(&self) -> &[u8] { + &self.value + } + #[inline] + pub fn mut_value(&mut self) -> &mut std::vec::Vec { + &mut self.value + } + #[inline] + pub fn take_value(&mut self) -> std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} +impl ::protobuf::Clear for KeyValue { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for KeyValue { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static KeyValue { + ::lazy_static::lazy_static! { + static ref INSTANCE: KeyValue = KeyValue::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl RaftSnapshotData { -pub fn new_() -> RaftSnapshotData { ::std::default::Default::default() } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn clear_file_size(&mut self) { self.file_size = 0 } -#[inline] pub fn set_file_size(&mut self, v: u64) { self.file_size = v; } -#[inline] pub fn get_file_size(&self) -> u64 { self.file_size } -#[inline] pub fn clear_data(&mut self) { self.data.clear(); } -#[inline] pub fn set_data(&mut self, v: :: std :: vec :: Vec < KeyValue >) { self.data = v; } -#[inline] pub fn get_data(&self) -> &:: std :: vec :: Vec < KeyValue > { &self.data } -#[inline] pub fn mut_data(&mut self) -> &mut :: std :: vec :: Vec < KeyValue > { &mut self.data } -#[inline] pub fn take_data(&mut self) -> :: std :: vec :: Vec < KeyValue > { ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) } -#[inline] pub fn clear_version(&mut self) { self.version = 0 } -#[inline] pub fn set_version(&mut self, v: u64) { self.version = v; } -#[inline] pub fn get_version(&self) -> u64 { self.version } -#[inline] pub fn has_meta(&self) -> bool { self.meta.is_some() } -#[inline] pub fn clear_meta(&mut self) { self.meta = ::std::option::Option::None } -#[inline] pub fn set_meta(&mut self, v: SnapshotMeta) { self.meta = ::std::option::Option::Some(v); } -#[inline] pub fn get_meta(&self) -> &SnapshotMeta { match self.meta.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_meta(&mut self) -> &mut SnapshotMeta { if self.meta.is_none() { - self.meta = ::std::option::Option::Some(SnapshotMeta::default()); - } - self.meta.as_mut().unwrap() } -#[inline] pub fn take_meta(&mut self) -> SnapshotMeta { self.meta.take().unwrap_or_else(SnapshotMeta::default) } -} -impl ::protobuf::Clear for RaftSnapshotData {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftSnapshotData {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftSnapshotData { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftSnapshotData = RaftSnapshotData::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> RaftSnapshotData { + ::std::default::Default::default() + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn clear_file_size(&mut self) { + self.file_size = 0 + } + #[inline] + pub fn set_file_size(&mut self, v: u64) { + self.file_size = v; + } + #[inline] + pub fn get_file_size(&self) -> u64 { + self.file_size + } + #[inline] + pub fn clear_data(&mut self) { + self.data.clear(); + } + #[inline] + pub fn set_data(&mut self, v: ::std::vec::Vec) { + self.data = v; + } + #[inline] + pub fn get_data(&self) -> &::std::vec::Vec { + &self.data + } + #[inline] + pub fn mut_data(&mut self) -> &mut ::std::vec::Vec { + &mut self.data + } + #[inline] + pub fn take_data(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_version(&mut self) { + self.version = 0 + } + #[inline] + pub fn set_version(&mut self, v: u64) { + self.version = v; + } + #[inline] + pub fn get_version(&self) -> u64 { + self.version + } + #[inline] + pub fn has_meta(&self) -> bool { + self.meta.is_some() + } + #[inline] + pub fn clear_meta(&mut self) { + self.meta = ::std::option::Option::None + } + #[inline] + pub fn set_meta(&mut self, v: SnapshotMeta) { + self.meta = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_meta(&self) -> &SnapshotMeta { + match self.meta.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_meta(&mut self) -> &mut SnapshotMeta { + if self.meta.is_none() { + self.meta = ::std::option::Option::Some(SnapshotMeta::default()); + } + self.meta.as_mut().unwrap() + } + #[inline] + pub fn take_meta(&mut self) -> SnapshotMeta { + self.meta.take().unwrap_or_else(SnapshotMeta::default) + } +} +impl ::protobuf::Clear for RaftSnapshotData { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftSnapshotData { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftSnapshotData { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftSnapshotData = RaftSnapshotData::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl StoreIdent { -pub fn new_() -> StoreIdent { ::std::default::Default::default() } -#[inline] pub fn clear_cluster_id(&mut self) { self.cluster_id = 0 } -#[inline] pub fn set_cluster_id(&mut self, v: u64) { self.cluster_id = v; } -#[inline] pub fn get_cluster_id(&self) -> u64 { self.cluster_id } -#[inline] pub fn clear_store_id(&mut self) { self.store_id = 0 } -#[inline] pub fn set_store_id(&mut self, v: u64) { self.store_id = v; } -#[inline] pub fn get_store_id(&self) -> u64 { self.store_id } -} -impl ::protobuf::Clear for StoreIdent {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for StoreIdent {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static StoreIdent { - ::lazy_static::lazy_static! { - static ref INSTANCE: StoreIdent = StoreIdent::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> StoreIdent { + ::std::default::Default::default() + } + #[inline] + pub fn clear_cluster_id(&mut self) { + self.cluster_id = 0 + } + #[inline] + pub fn set_cluster_id(&mut self, v: u64) { + self.cluster_id = v; + } + #[inline] + pub fn get_cluster_id(&self) -> u64 { + self.cluster_id + } + #[inline] + pub fn clear_store_id(&mut self) { + self.store_id = 0 + } + #[inline] + pub fn set_store_id(&mut self, v: u64) { + self.store_id = v; + } + #[inline] + pub fn get_store_id(&self) -> u64 { + self.store_id + } +} +impl ::protobuf::Clear for StoreIdent { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for StoreIdent { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static StoreIdent { + ::lazy_static::lazy_static! { + static ref INSTANCE: StoreIdent = StoreIdent::new_(); } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl RaftLocalState { -pub fn new_() -> RaftLocalState { ::std::default::Default::default() } -#[inline] pub fn has_hard_state(&self) -> bool { self.hard_state.is_some() } -#[inline] pub fn clear_hard_state(&mut self) { self.hard_state = ::std::option::Option::None } -#[inline] pub fn set_hard_state(&mut self, v: super :: eraftpb :: HardState) { self.hard_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_hard_state(&self) -> &super :: eraftpb :: HardState { match self.hard_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_hard_state(&mut self) -> &mut super :: eraftpb :: HardState { if self.hard_state.is_none() { - self.hard_state = ::std::option::Option::Some(super :: eraftpb :: HardState::default()); - } - self.hard_state.as_mut().unwrap() } -#[inline] pub fn take_hard_state(&mut self) -> super :: eraftpb :: HardState { self.hard_state.take().unwrap_or_else(super :: eraftpb :: HardState::default) } -#[inline] pub fn clear_last_index(&mut self) { self.last_index = 0 } -#[inline] pub fn set_last_index(&mut self, v: u64) { self.last_index = v; } -#[inline] pub fn get_last_index(&self) -> u64 { self.last_index } -} -impl ::protobuf::Clear for RaftLocalState {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftLocalState {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftLocalState { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftLocalState = RaftLocalState::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> RaftLocalState { + ::std::default::Default::default() + } + #[inline] + pub fn has_hard_state(&self) -> bool { + self.hard_state.is_some() + } + #[inline] + pub fn clear_hard_state(&mut self) { + self.hard_state = ::std::option::Option::None + } + #[inline] + pub fn set_hard_state(&mut self, v: super::eraftpb::HardState) { + self.hard_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_hard_state(&self) -> &super::eraftpb::HardState { + match self.hard_state.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_hard_state(&mut self) -> &mut super::eraftpb::HardState { + if self.hard_state.is_none() { + self.hard_state = ::std::option::Option::Some(super::eraftpb::HardState::default()); + } + self.hard_state.as_mut().unwrap() + } + #[inline] + pub fn take_hard_state(&mut self) -> super::eraftpb::HardState { + self.hard_state + .take() + .unwrap_or_else(super::eraftpb::HardState::default) + } + #[inline] + pub fn clear_last_index(&mut self) { + self.last_index = 0 + } + #[inline] + pub fn set_last_index(&mut self, v: u64) { + self.last_index = v; + } + #[inline] + pub fn get_last_index(&self) -> u64 { + self.last_index + } +} +impl ::protobuf::Clear for RaftLocalState { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftLocalState { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftLocalState { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftLocalState = RaftLocalState::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl RaftApplyState { -pub fn new_() -> RaftApplyState { ::std::default::Default::default() } -#[inline] pub fn clear_applied_index(&mut self) { self.applied_index = 0 } -#[inline] pub fn set_applied_index(&mut self, v: u64) { self.applied_index = v; } -#[inline] pub fn get_applied_index(&self) -> u64 { self.applied_index } -#[inline] pub fn has_truncated_state(&self) -> bool { self.truncated_state.is_some() } -#[inline] pub fn clear_truncated_state(&mut self) { self.truncated_state = ::std::option::Option::None } -#[inline] pub fn set_truncated_state(&mut self, v: RaftTruncatedState) { self.truncated_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_truncated_state(&self) -> &RaftTruncatedState { match self.truncated_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_truncated_state(&mut self) -> &mut RaftTruncatedState { if self.truncated_state.is_none() { - self.truncated_state = ::std::option::Option::Some(RaftTruncatedState::default()); - } - self.truncated_state.as_mut().unwrap() } -#[inline] pub fn take_truncated_state(&mut self) -> RaftTruncatedState { self.truncated_state.take().unwrap_or_else(RaftTruncatedState::default) } -} -impl ::protobuf::Clear for RaftApplyState {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RaftApplyState {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RaftApplyState { - ::lazy_static::lazy_static! { - static ref INSTANCE: RaftApplyState = RaftApplyState::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> RaftApplyState { + ::std::default::Default::default() + } + #[inline] + pub fn clear_applied_index(&mut self) { + self.applied_index = 0 + } + #[inline] + pub fn set_applied_index(&mut self, v: u64) { + self.applied_index = v; + } + #[inline] + pub fn get_applied_index(&self) -> u64 { + self.applied_index + } + #[inline] + pub fn has_truncated_state(&self) -> bool { + self.truncated_state.is_some() + } + #[inline] + pub fn clear_truncated_state(&mut self) { + self.truncated_state = ::std::option::Option::None + } + #[inline] + pub fn set_truncated_state(&mut self, v: RaftTruncatedState) { + self.truncated_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_truncated_state(&self) -> &RaftTruncatedState { + match self.truncated_state.as_ref() { + Some(v) => v, + None => ::default_instance(), } + } + #[inline] + pub fn mut_truncated_state(&mut self) -> &mut RaftTruncatedState { + if self.truncated_state.is_none() { + self.truncated_state = ::std::option::Option::Some(RaftTruncatedState::default()); + } + self.truncated_state.as_mut().unwrap() + } + #[inline] + pub fn take_truncated_state(&mut self) -> RaftTruncatedState { + self.truncated_state + .take() + .unwrap_or_else(RaftTruncatedState::default) + } +} +impl ::protobuf::Clear for RaftApplyState { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for RaftApplyState { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RaftApplyState { + ::lazy_static::lazy_static! { + static ref INSTANCE: RaftApplyState = RaftApplyState::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } } impl MergeState { -pub fn new_() -> MergeState { ::std::default::Default::default() } -#[inline] pub fn clear_min_index(&mut self) { self.min_index = 0 } -#[inline] pub fn set_min_index(&mut self, v: u64) { self.min_index = v; } -#[inline] pub fn get_min_index(&self) -> u64 { self.min_index } -#[inline] pub fn has_target(&self) -> bool { self.target.is_some() } -#[inline] pub fn clear_target(&mut self) { self.target = ::std::option::Option::None } -#[inline] pub fn set_target(&mut self, v: super :: metapb :: Region) { self.target = ::std::option::Option::Some(v); } -#[inline] pub fn get_target(&self) -> &super :: metapb :: Region { match self.target.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_target(&mut self) -> &mut super :: metapb :: Region { if self.target.is_none() { - self.target = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.target.as_mut().unwrap() } -#[inline] pub fn take_target(&mut self) -> super :: metapb :: Region { self.target.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn clear_commit(&mut self) { self.commit = 0 } -#[inline] pub fn set_commit(&mut self, v: u64) { self.commit = v; } -#[inline] pub fn get_commit(&self) -> u64 { self.commit } -} -impl ::protobuf::Clear for MergeState {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for MergeState {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static MergeState { - ::lazy_static::lazy_static! { - static ref INSTANCE: MergeState = MergeState::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> MergeState { + ::std::default::Default::default() + } + #[inline] + pub fn clear_min_index(&mut self) { + self.min_index = 0 + } + #[inline] + pub fn set_min_index(&mut self, v: u64) { + self.min_index = v; + } + #[inline] + pub fn get_min_index(&self) -> u64 { + self.min_index + } + #[inline] + pub fn has_target(&self) -> bool { + self.target.is_some() + } + #[inline] + pub fn clear_target(&mut self) { + self.target = ::std::option::Option::None + } + #[inline] + pub fn set_target(&mut self, v: super::metapb::Region) { + self.target = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_target(&self) -> &super::metapb::Region { + match self.target.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_target(&mut self) -> &mut super::metapb::Region { + if self.target.is_none() { + self.target = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.target.as_mut().unwrap() + } + #[inline] + pub fn take_target(&mut self) -> super::metapb::Region { + self.target + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn clear_commit(&mut self) { + self.commit = 0 + } + #[inline] + pub fn set_commit(&mut self, v: u64) { + self.commit = v; + } + #[inline] + pub fn get_commit(&self) -> u64 { + self.commit + } +} +impl ::protobuf::Clear for MergeState { + fn clear(&mut self) { + ::prost::Message::clear(self); + } +} +impl ::protobuf::Message for MergeState { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static MergeState { + ::lazy_static::lazy_static! { + static ref INSTANCE: MergeState = MergeState::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl RegionLocalState { -pub fn new_() -> RegionLocalState { ::std::default::Default::default() } -#[inline] pub fn clear_state(&mut self) { self.state = 0 } -#[inline] pub fn set_state_(&mut self, v: PeerState) { self.state = unsafe { ::std::mem::transmute::(v) }; } -#[inline] pub fn get_state(&self) -> PeerState { unsafe { ::std::mem::transmute::(self.state) } } -#[inline] pub fn has_region(&self) -> bool { self.region.is_some() } -#[inline] pub fn clear_region(&mut self) { self.region = ::std::option::Option::None } -#[inline] pub fn set_region(&mut self, v: super :: metapb :: Region) { self.region = ::std::option::Option::Some(v); } -#[inline] pub fn get_region(&self) -> &super :: metapb :: Region { match self.region.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_region(&mut self) -> &mut super :: metapb :: Region { if self.region.is_none() { - self.region = ::std::option::Option::Some(super :: metapb :: Region::default()); - } - self.region.as_mut().unwrap() } -#[inline] pub fn take_region(&mut self) -> super :: metapb :: Region { self.region.take().unwrap_or_else(super :: metapb :: Region::default) } -#[inline] pub fn has_merge_state(&self) -> bool { self.merge_state.is_some() } -#[inline] pub fn clear_merge_state(&mut self) { self.merge_state = ::std::option::Option::None } -#[inline] pub fn set_merge_state(&mut self, v: MergeState) { self.merge_state = ::std::option::Option::Some(v); } -#[inline] pub fn get_merge_state(&self) -> &MergeState { match self.merge_state.as_ref() { - Some(v) => v, - None => ::default_instance(), - } } -#[inline] pub fn mut_merge_state(&mut self) -> &mut MergeState { if self.merge_state.is_none() { - self.merge_state = ::std::option::Option::Some(MergeState::default()); - } - self.merge_state.as_mut().unwrap() } -#[inline] pub fn take_merge_state(&mut self) -> MergeState { self.merge_state.take().unwrap_or_else(MergeState::default) } -} -impl ::protobuf::Clear for RegionLocalState {fn clear(&mut self) { ::prost::Message::clear(self); } -} -impl ::protobuf::Message for RegionLocalState {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static RegionLocalState { - ::lazy_static::lazy_static! { - static ref INSTANCE: RegionLocalState = RegionLocalState::new_(); - } - &*INSTANCE - } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) - } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + pub fn new_() -> RegionLocalState { + ::std::default::Default::default() + } + #[inline] + pub fn clear_state(&mut self) { + self.state = 0 + } + #[inline] + pub fn set_state_(&mut self, v: PeerState) { + self.state = unsafe { ::std::mem::transmute::(v) }; + } + #[inline] + pub fn get_state(&self) -> PeerState { + unsafe { ::std::mem::transmute::(self.state) } + } + #[inline] + pub fn has_region(&self) -> bool { + self.region.is_some() + } + #[inline] + pub fn clear_region(&mut self) { + self.region = ::std::option::Option::None + } + #[inline] + pub fn set_region(&mut self, v: super::metapb::Region) { + self.region = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_region(&self) -> &super::metapb::Region { + match self.region.as_ref() { + Some(v) => v, + None => ::default_instance(), } + } + #[inline] + pub fn mut_region(&mut self) -> &mut super::metapb::Region { + if self.region.is_none() { + self.region = ::std::option::Option::Some(super::metapb::Region::default()); + } + self.region.as_mut().unwrap() + } + #[inline] + pub fn take_region(&mut self) -> super::metapb::Region { + self.region + .take() + .unwrap_or_else(super::metapb::Region::default) + } + #[inline] + pub fn has_merge_state(&self) -> bool { + self.merge_state.is_some() + } + #[inline] + pub fn clear_merge_state(&mut self) { + self.merge_state = ::std::option::Option::None + } + #[inline] + pub fn set_merge_state(&mut self, v: MergeState) { + self.merge_state = ::std::option::Option::Some(v); + } + #[inline] + pub fn get_merge_state(&self) -> &MergeState { + match self.merge_state.as_ref() { + Some(v) => v, + None => ::default_instance(), + } + } + #[inline] + pub fn mut_merge_state(&mut self) -> &mut MergeState { + if self.merge_state.is_none() { + self.merge_state = ::std::option::Option::Some(MergeState::default()); + } + self.merge_state.as_mut().unwrap() + } + #[inline] + pub fn take_merge_state(&mut self) -> MergeState { + self.merge_state.take().unwrap_or_else(MergeState::default) + } } -impl PeerState { -pub fn values() -> &'static [Self] { -static VALUES: &'static [PeerState] = &[ -PeerState::Normal, -PeerState::Applying, -PeerState::Tombstone, -PeerState::Merging, -]; -VALUES +impl ::protobuf::Clear for RegionLocalState { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } +impl ::protobuf::Message for RegionLocalState { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static RegionLocalState { + ::lazy_static::lazy_static! { + static ref INSTANCE: RegionLocalState = RegionLocalState::new_(); + } + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); + } + Ok(()) + } +} +impl PeerState { + pub fn values() -> &'static [Self] { + static VALUES: &'static [PeerState] = &[ + PeerState::Normal, + PeerState::Applying, + PeerState::Tombstone, + PeerState::Merging, + ]; + VALUES + } } diff --git a/src/prost/wrapper_rustproto.rs b/src/prost/wrapper_rustproto.rs index 5ac01746b..ac788b3f8 100644 --- a/src/prost/wrapper_rustproto.rs +++ b/src/prost/wrapper_rustproto.rs @@ -1,2 +1 @@ // Generated file, please don't edit manually. - diff --git a/src/prost/wrapper_tikvpb.rs b/src/prost/wrapper_tikvpb.rs index c713a2490..df4dbb602 100644 --- a/src/prost/wrapper_tikvpb.rs +++ b/src/prost/wrapper_tikvpb.rs @@ -1,205 +1,469 @@ // Generated file, please don't edit manually. impl BatchCommandsRequest { -pub fn new_() -> BatchCommandsRequest { ::std::default::Default::default() } -#[inline] pub fn clear_requests(&mut self) { self.requests.clear(); } -#[inline] pub fn set_requests(&mut self, v: :: std :: vec :: Vec < batch_commands_request :: Request >) { self.requests = v; } -#[inline] pub fn get_requests(&self) -> &:: std :: vec :: Vec < batch_commands_request :: Request > { &self.requests } -#[inline] pub fn mut_requests(&mut self) -> &mut :: std :: vec :: Vec < batch_commands_request :: Request > { &mut self.requests } -#[inline] pub fn take_requests(&mut self) -> :: std :: vec :: Vec < batch_commands_request :: Request > { ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) } -#[inline] pub fn clear_request_ids(&mut self) { self.request_ids.clear(); } -#[inline] pub fn set_request_ids(&mut self, v: :: std :: vec :: Vec < u64 >) { self.request_ids = v; } -#[inline] pub fn get_request_ids(&self) -> &:: std :: vec :: Vec < u64 > { &self.request_ids } -#[inline] pub fn mut_request_ids(&mut self) -> &mut :: std :: vec :: Vec < u64 > { &mut self.request_ids } -#[inline] pub fn take_request_ids(&mut self) -> :: std :: vec :: Vec < u64 > { ::std::mem::replace(&mut self.request_ids, ::std::vec::Vec::new()) } + pub fn new_() -> BatchCommandsRequest { + ::std::default::Default::default() + } + #[inline] + pub fn clear_requests(&mut self) { + self.requests.clear(); + } + #[inline] + pub fn set_requests(&mut self, v: ::std::vec::Vec) { + self.requests = v; + } + #[inline] + pub fn get_requests(&self) -> &::std::vec::Vec { + &self.requests + } + #[inline] + pub fn mut_requests(&mut self) -> &mut ::std::vec::Vec { + &mut self.requests + } + #[inline] + pub fn take_requests(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.requests, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_request_ids(&mut self) { + self.request_ids.clear(); + } + #[inline] + pub fn set_request_ids(&mut self, v: ::std::vec::Vec) { + self.request_ids = v; + } + #[inline] + pub fn get_request_ids(&self) -> &::std::vec::Vec { + &self.request_ids + } + #[inline] + pub fn mut_request_ids(&mut self) -> &mut ::std::vec::Vec { + &mut self.request_ids + } + #[inline] + pub fn take_request_ids(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.request_ids, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for BatchCommandsRequest {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for BatchCommandsRequest { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for BatchCommandsRequest {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchCommandsRequest { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchCommandsRequest = BatchCommandsRequest::new_(); - } - &*INSTANCE +impl ::protobuf::Message for BatchCommandsRequest { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchCommandsRequest { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchCommandsRequest = BatchCommandsRequest::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl batch_commands_request::Request { -pub fn new_() -> batch_commands_request::Request { ::std::default::Default::default() } + pub fn new_() -> batch_commands_request::Request { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for batch_commands_request::Request {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for batch_commands_request::Request { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for batch_commands_request::Request {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static batch_commands_request::Request { - ::lazy_static::lazy_static! { - static ref INSTANCE: batch_commands_request::Request = batch_commands_request::Request::new_(); - } - &*INSTANCE +impl ::protobuf::Message for batch_commands_request::Request { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static batch_commands_request::Request { + ::lazy_static::lazy_static! { + static ref INSTANCE: batch_commands_request::Request = batch_commands_request::Request::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl BatchCommandsResponse { -pub fn new_() -> BatchCommandsResponse { ::std::default::Default::default() } -#[inline] pub fn clear_responses(&mut self) { self.responses.clear(); } -#[inline] pub fn set_responses(&mut self, v: :: std :: vec :: Vec < batch_commands_response :: Response >) { self.responses = v; } -#[inline] pub fn get_responses(&self) -> &:: std :: vec :: Vec < batch_commands_response :: Response > { &self.responses } -#[inline] pub fn mut_responses(&mut self) -> &mut :: std :: vec :: Vec < batch_commands_response :: Response > { &mut self.responses } -#[inline] pub fn take_responses(&mut self) -> :: std :: vec :: Vec < batch_commands_response :: Response > { ::std::mem::replace(&mut self.responses, ::std::vec::Vec::new()) } -#[inline] pub fn clear_request_ids(&mut self) { self.request_ids.clear(); } -#[inline] pub fn set_request_ids(&mut self, v: :: std :: vec :: Vec < u64 >) { self.request_ids = v; } -#[inline] pub fn get_request_ids(&self) -> &:: std :: vec :: Vec < u64 > { &self.request_ids } -#[inline] pub fn mut_request_ids(&mut self) -> &mut :: std :: vec :: Vec < u64 > { &mut self.request_ids } -#[inline] pub fn take_request_ids(&mut self) -> :: std :: vec :: Vec < u64 > { ::std::mem::replace(&mut self.request_ids, ::std::vec::Vec::new()) } -#[inline] pub fn clear_transport_layer_load(&mut self) { self.transport_layer_load = 0 } -#[inline] pub fn set_transport_layer_load(&mut self, v: u64) { self.transport_layer_load = v; } -#[inline] pub fn get_transport_layer_load(&self) -> u64 { self.transport_layer_load } + pub fn new_() -> BatchCommandsResponse { + ::std::default::Default::default() + } + #[inline] + pub fn clear_responses(&mut self) { + self.responses.clear(); + } + #[inline] + pub fn set_responses(&mut self, v: ::std::vec::Vec) { + self.responses = v; + } + #[inline] + pub fn get_responses(&self) -> &::std::vec::Vec { + &self.responses + } + #[inline] + pub fn mut_responses(&mut self) -> &mut ::std::vec::Vec { + &mut self.responses + } + #[inline] + pub fn take_responses(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.responses, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_request_ids(&mut self) { + self.request_ids.clear(); + } + #[inline] + pub fn set_request_ids(&mut self, v: ::std::vec::Vec) { + self.request_ids = v; + } + #[inline] + pub fn get_request_ids(&self) -> &::std::vec::Vec { + &self.request_ids + } + #[inline] + pub fn mut_request_ids(&mut self) -> &mut ::std::vec::Vec { + &mut self.request_ids + } + #[inline] + pub fn take_request_ids(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.request_ids, ::std::vec::Vec::new()) + } + #[inline] + pub fn clear_transport_layer_load(&mut self) { + self.transport_layer_load = 0 + } + #[inline] + pub fn set_transport_layer_load(&mut self, v: u64) { + self.transport_layer_load = v; + } + #[inline] + pub fn get_transport_layer_load(&self) -> u64 { + self.transport_layer_load + } } -impl ::protobuf::Clear for BatchCommandsResponse {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for BatchCommandsResponse { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for BatchCommandsResponse {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchCommandsResponse { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchCommandsResponse = BatchCommandsResponse::new_(); - } - &*INSTANCE +impl ::protobuf::Message for BatchCommandsResponse { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchCommandsResponse { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchCommandsResponse = BatchCommandsResponse::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl batch_commands_response::Response { -pub fn new_() -> batch_commands_response::Response { ::std::default::Default::default() } + pub fn new_() -> batch_commands_response::Response { + ::std::default::Default::default() + } } -impl ::protobuf::Clear for batch_commands_response::Response {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for batch_commands_response::Response { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for batch_commands_response::Response {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static batch_commands_response::Response { - ::lazy_static::lazy_static! { - static ref INSTANCE: batch_commands_response::Response = batch_commands_response::Response::new_(); - } - &*INSTANCE +impl ::protobuf::Message for batch_commands_response::Response { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static batch_commands_response::Response { + ::lazy_static::lazy_static! { + static ref INSTANCE: batch_commands_response::Response = batch_commands_response::Response::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } } impl BatchRaftMessage { -pub fn new_() -> BatchRaftMessage { ::std::default::Default::default() } -#[inline] pub fn clear_msgs(&mut self) { self.msgs.clear(); } -#[inline] pub fn set_msgs(&mut self, v: :: std :: vec :: Vec < super :: raft_serverpb :: RaftMessage >) { self.msgs = v; } -#[inline] pub fn get_msgs(&self) -> &:: std :: vec :: Vec < super :: raft_serverpb :: RaftMessage > { &self.msgs } -#[inline] pub fn mut_msgs(&mut self) -> &mut :: std :: vec :: Vec < super :: raft_serverpb :: RaftMessage > { &mut self.msgs } -#[inline] pub fn take_msgs(&mut self) -> :: std :: vec :: Vec < super :: raft_serverpb :: RaftMessage > { ::std::mem::replace(&mut self.msgs, ::std::vec::Vec::new()) } + pub fn new_() -> BatchRaftMessage { + ::std::default::Default::default() + } + #[inline] + pub fn clear_msgs(&mut self) { + self.msgs.clear(); + } + #[inline] + pub fn set_msgs(&mut self, v: ::std::vec::Vec) { + self.msgs = v; + } + #[inline] + pub fn get_msgs(&self) -> &::std::vec::Vec { + &self.msgs + } + #[inline] + pub fn mut_msgs(&mut self) -> &mut ::std::vec::Vec { + &mut self.msgs + } + #[inline] + pub fn take_msgs(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.msgs, ::std::vec::Vec::new()) + } } -impl ::protobuf::Clear for BatchRaftMessage {fn clear(&mut self) { ::prost::Message::clear(self); } +impl ::protobuf::Clear for BatchRaftMessage { + fn clear(&mut self) { + ::prost::Message::clear(self); + } } -impl ::protobuf::Message for BatchRaftMessage {fn compute_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn get_cached_size(&self) -> u32 { ::prost::Message::encoded_len(self) as u32 } -fn as_any(&self) -> &::std::any::Any { self as &::std::any::Any } -fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } -fn new() -> Self { Self::new_() } -fn write_to_with_cached_sizes(&self, _os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn default_instance() -> &'static BatchRaftMessage { - ::lazy_static::lazy_static! { - static ref INSTANCE: BatchRaftMessage = BatchRaftMessage::new_(); - } - &*INSTANCE +impl ::protobuf::Message for BatchRaftMessage { + fn compute_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn get_cached_size(&self) -> u32 { + ::prost::Message::encoded_len(self) as u32 + } + fn as_any(&self) -> &dyn::std::any::Any { + self as &dyn::std::any::Any + } + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + fn write_to_with_cached_sizes( + &self, + _os: &mut ::protobuf::CodedOutputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn new() -> Self { + Self::new_() + } + fn default_instance() -> &'static BatchRaftMessage { + ::lazy_static::lazy_static! { + static ref INSTANCE: BatchRaftMessage = BatchRaftMessage::new_(); } -fn is_initialized(&self) -> bool { true } -fn merge_from(&mut self, _is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { unimplemented!(); } -fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { unimplemented!(); } -fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { unimplemented!(); } -fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { - let mut buf = Vec::new(); - if let Err(_) = ::prost::Message::encode(self, &mut buf) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(buf) + &*INSTANCE + } + fn is_initialized(&self) -> bool { + true + } + fn merge_from( + &mut self, + _is: &mut ::protobuf::CodedInputStream, + ) -> ::protobuf::ProtobufResult<()> { + unimplemented!(); + } + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + unimplemented!(); + } + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + unimplemented!(); + } + fn write_to_bytes(&self) -> ::protobuf::ProtobufResult> { + let mut buf = Vec::new(); + if let Err(_) = ::prost::Message::encode(self, &mut buf) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } -fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { - if let Err(_) = ::prost::Message::merge(self, bytes) { - return Err(::protobuf::ProtobufError::WireError(::protobuf::error::WireError::Other)); - } - Ok(()) + Ok(buf) + } + fn merge_from_bytes(&mut self, bytes: &[u8]) -> ::protobuf::ProtobufResult<()> { + if let Err(_) = ::prost::Message::merge(self, bytes) { + return Err(::protobuf::ProtobufError::WireError( + ::protobuf::error::WireError::Other, + )); } + Ok(()) + } }