#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0;
#[derive(PartialEq,Clone,Default)]
pub struct Entry {
pub entry_type: EntryType,
pub term: u64,
pub index: u64,
pub data: ::std::vec::Vec<u8>,
pub context: ::std::vec::Vec<u8>,
pub sync_log: bool,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Entry {
fn default() -> &'a Entry {
<Entry as ::protobuf::Message>::default_instance()
}
}
impl Entry {
pub fn new() -> Entry {
::std::default::Default::default()
}
pub fn get_entry_type(&self) -> EntryType {
self.entry_type
}
pub fn clear_entry_type(&mut self) {
self.entry_type = EntryType::EntryNormal;
}
pub fn set_entry_type(&mut self, v: EntryType) {
self.entry_type = v;
}
pub fn get_term(&self) -> u64 {
self.term
}
pub fn clear_term(&mut self) {
self.term = 0;
}
pub fn set_term(&mut self, v: u64) {
self.term = v;
}
pub fn get_index(&self) -> u64 {
self.index
}
pub fn clear_index(&mut self) {
self.index = 0;
}
pub fn set_index(&mut self, v: u64) {
self.index = v;
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_context(&self) -> &[u8] {
&self.context
}
pub fn clear_context(&mut self) {
self.context.clear();
}
pub fn set_context(&mut self, v: ::std::vec::Vec<u8>) {
self.context = v;
}
pub fn mut_context(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.context
}
pub fn take_context(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.context, ::std::vec::Vec::new())
}
pub fn get_sync_log(&self) -> bool {
self.sync_log
}
pub fn clear_sync_log(&mut self) {
self.sync_log = false;
}
pub fn set_sync_log(&mut self, v: bool) {
self.sync_log = v;
}
}
impl ::protobuf::Message for Entry {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type == ::protobuf::wire_format::WireTypeVarint {self.entry_type = is.read_enum()?;} else {return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));}
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.term = tmp;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.index = tmp;
},
4 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
6 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.context)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.sync_log = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.entry_type != EntryType::EntryNormal {
my_size += ::protobuf::rt::enum_size(1, self.entry_type);
}
if self.term != 0 {
my_size += ::protobuf::rt::value_size(2, self.term, ::protobuf::wire_format::WireTypeVarint);
}
if self.index != 0 {
my_size += ::protobuf::rt::value_size(3, self.index, ::protobuf::wire_format::WireTypeVarint);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(4, &self.data);
}
if !self.context.is_empty() {
my_size += ::protobuf::rt::bytes_size(6, &self.context);
}
if self.sync_log != false {
my_size += 2;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.entry_type != EntryType::EntryNormal {
os.write_enum(1, self.entry_type.value())?;
}
if self.term != 0 {
os.write_uint64(2, self.term)?;
}
if self.index != 0 {
os.write_uint64(3, self.index)?;
}
if !self.data.is_empty() {
os.write_bytes(4, &self.data)?;
}
if !self.context.is_empty() {
os.write_bytes(6, &self.context)?;
}
if self.sync_log != false {
os.write_bool(5, self.sync_log)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Entry {
Entry::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<EntryType>>(
"entry_type",
|m: &Entry| { &m.entry_type },
|m: &mut Entry| { &mut m.entry_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"term",
|m: &Entry| { &m.term },
|m: &mut Entry| { &mut m.term },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"index",
|m: &Entry| { &m.index },
|m: &mut Entry| { &mut m.index },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &Entry| { &m.data },
|m: &mut Entry| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"context",
|m: &Entry| { &m.context },
|m: &mut Entry| { &mut m.context },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"sync_log",
|m: &Entry| { &m.sync_log },
|m: &mut Entry| { &mut m.sync_log },
));
::protobuf::reflect::MessageDescriptor::new::<Entry>(
"Entry",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Entry {
static mut instance: ::protobuf::lazy::Lazy<Entry> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Entry,
};
unsafe {
instance.get(Entry::new)
}
}
}
impl ::protobuf::Clear for Entry {
fn clear(&mut self) {
self.entry_type = EntryType::EntryNormal;
self.term = 0;
self.index = 0;
self.data.clear();
self.context.clear();
self.sync_log = false;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Entry {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Entry {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct SnapshotMetadata {
pub conf_state: ::protobuf::SingularPtrField<ConfState>,
pub pending_membership_change: ::protobuf::SingularPtrField<ConfState>,
pub pending_membership_change_index: u64,
pub index: u64,
pub term: u64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a SnapshotMetadata {
fn default() -> &'a SnapshotMetadata {
<SnapshotMetadata as ::protobuf::Message>::default_instance()
}
}
impl SnapshotMetadata {
pub fn new() -> SnapshotMetadata {
::std::default::Default::default()
}
pub fn get_conf_state(&self) -> &ConfState {
self.conf_state.as_ref().unwrap_or_else(|| ConfState::default_instance())
}
pub fn clear_conf_state(&mut self) {
self.conf_state.clear();
}
pub fn has_conf_state(&self) -> bool {
self.conf_state.is_some()
}
pub fn set_conf_state(&mut self, v: ConfState) {
self.conf_state = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_conf_state(&mut self) -> &mut ConfState {
if self.conf_state.is_none() {
self.conf_state.set_default();
}
self.conf_state.as_mut().unwrap()
}
pub fn take_conf_state(&mut self) -> ConfState {
self.conf_state.take().unwrap_or_else(|| ConfState::new())
}
pub fn get_pending_membership_change(&self) -> &ConfState {
self.pending_membership_change.as_ref().unwrap_or_else(|| ConfState::default_instance())
}
pub fn clear_pending_membership_change(&mut self) {
self.pending_membership_change.clear();
}
pub fn has_pending_membership_change(&self) -> bool {
self.pending_membership_change.is_some()
}
pub fn set_pending_membership_change(&mut self, v: ConfState) {
self.pending_membership_change = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_pending_membership_change(&mut self) -> &mut ConfState {
if self.pending_membership_change.is_none() {
self.pending_membership_change.set_default();
}
self.pending_membership_change.as_mut().unwrap()
}
pub fn take_pending_membership_change(&mut self) -> ConfState {
self.pending_membership_change.take().unwrap_or_else(|| ConfState::new())
}
pub fn get_pending_membership_change_index(&self) -> u64 {
self.pending_membership_change_index
}
pub fn clear_pending_membership_change_index(&mut self) {
self.pending_membership_change_index = 0;
}
pub fn set_pending_membership_change_index(&mut self, v: u64) {
self.pending_membership_change_index = v;
}
pub fn get_index(&self) -> u64 {
self.index
}
pub fn clear_index(&mut self) {
self.index = 0;
}
pub fn set_index(&mut self, v: u64) {
self.index = v;
}
pub fn get_term(&self) -> u64 {
self.term
}
pub fn clear_term(&mut self) {
self.term = 0;
}
pub fn set_term(&mut self, v: u64) {
self.term = v;
}
}
impl ::protobuf::Message for SnapshotMetadata {
fn is_initialized(&self) -> bool {
for v in &self.conf_state {
if !v.is_initialized() {
return false;
}
};
for v in &self.pending_membership_change {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.conf_state)?;
},
4 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pending_membership_change)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.pending_membership_change_index = tmp;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.index = tmp;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.term = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.conf_state.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.pending_membership_change.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.pending_membership_change_index != 0 {
my_size += ::protobuf::rt::value_size(5, self.pending_membership_change_index, ::protobuf::wire_format::WireTypeVarint);
}
if self.index != 0 {
my_size += ::protobuf::rt::value_size(2, self.index, ::protobuf::wire_format::WireTypeVarint);
}
if self.term != 0 {
my_size += ::protobuf::rt::value_size(3, self.term, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.conf_state.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.pending_membership_change.as_ref() {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.pending_membership_change_index != 0 {
os.write_uint64(5, self.pending_membership_change_index)?;
}
if self.index != 0 {
os.write_uint64(2, self.index)?;
}
if self.term != 0 {
os.write_uint64(3, self.term)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> SnapshotMetadata {
SnapshotMetadata::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConfState>>(
"conf_state",
|m: &SnapshotMetadata| { &m.conf_state },
|m: &mut SnapshotMetadata| { &mut m.conf_state },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConfState>>(
"pending_membership_change",
|m: &SnapshotMetadata| { &m.pending_membership_change },
|m: &mut SnapshotMetadata| { &mut m.pending_membership_change },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"pending_membership_change_index",
|m: &SnapshotMetadata| { &m.pending_membership_change_index },
|m: &mut SnapshotMetadata| { &mut m.pending_membership_change_index },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"index",
|m: &SnapshotMetadata| { &m.index },
|m: &mut SnapshotMetadata| { &mut m.index },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"term",
|m: &SnapshotMetadata| { &m.term },
|m: &mut SnapshotMetadata| { &mut m.term },
));
::protobuf::reflect::MessageDescriptor::new::<SnapshotMetadata>(
"SnapshotMetadata",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static SnapshotMetadata {
static mut instance: ::protobuf::lazy::Lazy<SnapshotMetadata> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const SnapshotMetadata,
};
unsafe {
instance.get(SnapshotMetadata::new)
}
}
}
impl ::protobuf::Clear for SnapshotMetadata {
fn clear(&mut self) {
self.conf_state.clear();
self.pending_membership_change.clear();
self.pending_membership_change_index = 0;
self.index = 0;
self.term = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for SnapshotMetadata {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for SnapshotMetadata {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Snapshot {
pub data: ::std::vec::Vec<u8>,
pub metadata: ::protobuf::SingularPtrField<SnapshotMetadata>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Snapshot {
fn default() -> &'a Snapshot {
<Snapshot as ::protobuf::Message>::default_instance()
}
}
impl Snapshot {
pub fn new() -> Snapshot {
::std::default::Default::default()
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_metadata(&self) -> &SnapshotMetadata {
self.metadata.as_ref().unwrap_or_else(|| SnapshotMetadata::default_instance())
}
pub fn clear_metadata(&mut self) {
self.metadata.clear();
}
pub fn has_metadata(&self) -> bool {
self.metadata.is_some()
}
pub fn set_metadata(&mut self, v: SnapshotMetadata) {
self.metadata = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_metadata(&mut self) -> &mut SnapshotMetadata {
if self.metadata.is_none() {
self.metadata.set_default();
}
self.metadata.as_mut().unwrap()
}
pub fn take_metadata(&mut self) -> SnapshotMetadata {
self.metadata.take().unwrap_or_else(|| SnapshotMetadata::new())
}
}
impl ::protobuf::Message for Snapshot {
fn is_initialized(&self) -> bool {
for v in &self.metadata {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.metadata)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.data);
}
if let Some(ref v) = self.metadata.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if !self.data.is_empty() {
os.write_bytes(1, &self.data)?;
}
if let Some(ref v) = self.metadata.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Snapshot {
Snapshot::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &Snapshot| { &m.data },
|m: &mut Snapshot| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<SnapshotMetadata>>(
"metadata",
|m: &Snapshot| { &m.metadata },
|m: &mut Snapshot| { &mut m.metadata },
));
::protobuf::reflect::MessageDescriptor::new::<Snapshot>(
"Snapshot",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Snapshot {
static mut instance: ::protobuf::lazy::Lazy<Snapshot> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Snapshot,
};
unsafe {
instance.get(Snapshot::new)
}
}
}
impl ::protobuf::Clear for Snapshot {
fn clear(&mut self) {
self.data.clear();
self.metadata.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Snapshot {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Snapshot {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Message {
pub msg_type: MessageType,
pub to: u64,
pub from: u64,
pub term: u64,
pub log_term: u64,
pub index: u64,
pub entries: ::protobuf::RepeatedField<Entry>,
pub commit: u64,
pub snapshot: ::protobuf::SingularPtrField<Snapshot>,
pub request_snapshot: u64,
pub reject: bool,
pub reject_hint: u64,
pub context: ::std::vec::Vec<u8>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Message {
fn default() -> &'a Message {
<Message as ::protobuf::Message>::default_instance()
}
}
impl Message {
pub fn new() -> Message {
::std::default::Default::default()
}
pub fn get_msg_type(&self) -> MessageType {
self.msg_type
}
pub fn clear_msg_type(&mut self) {
self.msg_type = MessageType::MsgHup;
}
pub fn set_msg_type(&mut self, v: MessageType) {
self.msg_type = v;
}
pub fn get_to(&self) -> u64 {
self.to
}
pub fn clear_to(&mut self) {
self.to = 0;
}
pub fn set_to(&mut self, v: u64) {
self.to = v;
}
pub fn get_from(&self) -> u64 {
self.from
}
pub fn clear_from(&mut self) {
self.from = 0;
}
pub fn set_from(&mut self, v: u64) {
self.from = v;
}
pub fn get_term(&self) -> u64 {
self.term
}
pub fn clear_term(&mut self) {
self.term = 0;
}
pub fn set_term(&mut self, v: u64) {
self.term = v;
}
pub fn get_log_term(&self) -> u64 {
self.log_term
}
pub fn clear_log_term(&mut self) {
self.log_term = 0;
}
pub fn set_log_term(&mut self, v: u64) {
self.log_term = v;
}
pub fn get_index(&self) -> u64 {
self.index
}
pub fn clear_index(&mut self) {
self.index = 0;
}
pub fn set_index(&mut self, v: u64) {
self.index = v;
}
pub fn get_entries(&self) -> &[Entry] {
&self.entries
}
pub fn clear_entries(&mut self) {
self.entries.clear();
}
pub fn set_entries(&mut self, v: ::protobuf::RepeatedField<Entry>) {
self.entries = v;
}
pub fn mut_entries(&mut self) -> &mut ::protobuf::RepeatedField<Entry> {
&mut self.entries
}
pub fn take_entries(&mut self) -> ::protobuf::RepeatedField<Entry> {
::std::mem::replace(&mut self.entries, ::protobuf::RepeatedField::new())
}
pub fn get_commit(&self) -> u64 {
self.commit
}
pub fn clear_commit(&mut self) {
self.commit = 0;
}
pub fn set_commit(&mut self, v: u64) {
self.commit = v;
}
pub fn get_snapshot(&self) -> &Snapshot {
self.snapshot.as_ref().unwrap_or_else(|| Snapshot::default_instance())
}
pub fn clear_snapshot(&mut self) {
self.snapshot.clear();
}
pub fn has_snapshot(&self) -> bool {
self.snapshot.is_some()
}
pub fn set_snapshot(&mut self, v: Snapshot) {
self.snapshot = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_snapshot(&mut self) -> &mut Snapshot {
if self.snapshot.is_none() {
self.snapshot.set_default();
}
self.snapshot.as_mut().unwrap()
}
pub fn take_snapshot(&mut self) -> Snapshot {
self.snapshot.take().unwrap_or_else(|| Snapshot::new())
}
pub fn get_request_snapshot(&self) -> u64 {
self.request_snapshot
}
pub fn clear_request_snapshot(&mut self) {
self.request_snapshot = 0;
}
pub fn set_request_snapshot(&mut self, v: u64) {
self.request_snapshot = v;
}
pub fn get_reject(&self) -> bool {
self.reject
}
pub fn clear_reject(&mut self) {
self.reject = false;
}
pub fn set_reject(&mut self, v: bool) {
self.reject = v;
}
pub fn get_reject_hint(&self) -> u64 {
self.reject_hint
}
pub fn clear_reject_hint(&mut self) {
self.reject_hint = 0;
}
pub fn set_reject_hint(&mut self, v: u64) {
self.reject_hint = v;
}
pub fn get_context(&self) -> &[u8] {
&self.context
}
pub fn clear_context(&mut self) {
self.context.clear();
}
pub fn set_context(&mut self, v: ::std::vec::Vec<u8>) {
self.context = v;
}
pub fn mut_context(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.context
}
pub fn take_context(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.context, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for Message {
fn is_initialized(&self) -> bool {
for v in &self.entries {
if !v.is_initialized() {
return false;
}
};
for v in &self.snapshot {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type == ::protobuf::wire_format::WireTypeVarint {self.msg_type = is.read_enum()?;} else {return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));}
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.to = tmp;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.from = tmp;
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.term = tmp;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.log_term = tmp;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.index = tmp;
},
7 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.entries)?;
},
8 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.commit = tmp;
},
9 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.snapshot)?;
},
13 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.request_snapshot = tmp;
},
10 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.reject = tmp;
},
11 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.reject_hint = tmp;
},
12 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.context)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.msg_type != MessageType::MsgHup {
my_size += ::protobuf::rt::enum_size(1, self.msg_type);
}
if self.to != 0 {
my_size += ::protobuf::rt::value_size(2, self.to, ::protobuf::wire_format::WireTypeVarint);
}
if self.from != 0 {
my_size += ::protobuf::rt::value_size(3, self.from, ::protobuf::wire_format::WireTypeVarint);
}
if self.term != 0 {
my_size += ::protobuf::rt::value_size(4, self.term, ::protobuf::wire_format::WireTypeVarint);
}
if self.log_term != 0 {
my_size += ::protobuf::rt::value_size(5, self.log_term, ::protobuf::wire_format::WireTypeVarint);
}
if self.index != 0 {
my_size += ::protobuf::rt::value_size(6, self.index, ::protobuf::wire_format::WireTypeVarint);
}
for value in &self.entries {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if self.commit != 0 {
my_size += ::protobuf::rt::value_size(8, self.commit, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(ref v) = self.snapshot.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.request_snapshot != 0 {
my_size += ::protobuf::rt::value_size(13, self.request_snapshot, ::protobuf::wire_format::WireTypeVarint);
}
if self.reject != false {
my_size += 2;
}
if self.reject_hint != 0 {
my_size += ::protobuf::rt::value_size(11, self.reject_hint, ::protobuf::wire_format::WireTypeVarint);
}
if !self.context.is_empty() {
my_size += ::protobuf::rt::bytes_size(12, &self.context);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.msg_type != MessageType::MsgHup {
os.write_enum(1, self.msg_type.value())?;
}
if self.to != 0 {
os.write_uint64(2, self.to)?;
}
if self.from != 0 {
os.write_uint64(3, self.from)?;
}
if self.term != 0 {
os.write_uint64(4, self.term)?;
}
if self.log_term != 0 {
os.write_uint64(5, self.log_term)?;
}
if self.index != 0 {
os.write_uint64(6, self.index)?;
}
for v in &self.entries {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if self.commit != 0 {
os.write_uint64(8, self.commit)?;
}
if let Some(ref v) = self.snapshot.as_ref() {
os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.request_snapshot != 0 {
os.write_uint64(13, self.request_snapshot)?;
}
if self.reject != false {
os.write_bool(10, self.reject)?;
}
if self.reject_hint != 0 {
os.write_uint64(11, self.reject_hint)?;
}
if !self.context.is_empty() {
os.write_bytes(12, &self.context)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Message {
Message::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<MessageType>>(
"msg_type",
|m: &Message| { &m.msg_type },
|m: &mut Message| { &mut m.msg_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"to",
|m: &Message| { &m.to },
|m: &mut Message| { &mut m.to },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"from",
|m: &Message| { &m.from },
|m: &mut Message| { &mut m.from },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"term",
|m: &Message| { &m.term },
|m: &mut Message| { &mut m.term },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"log_term",
|m: &Message| { &m.log_term },
|m: &mut Message| { &mut m.log_term },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"index",
|m: &Message| { &m.index },
|m: &mut Message| { &mut m.index },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Entry>>(
"entries",
|m: &Message| { &m.entries },
|m: &mut Message| { &mut m.entries },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"commit",
|m: &Message| { &m.commit },
|m: &mut Message| { &mut m.commit },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Snapshot>>(
"snapshot",
|m: &Message| { &m.snapshot },
|m: &mut Message| { &mut m.snapshot },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"request_snapshot",
|m: &Message| { &m.request_snapshot },
|m: &mut Message| { &mut m.request_snapshot },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"reject",
|m: &Message| { &m.reject },
|m: &mut Message| { &mut m.reject },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"reject_hint",
|m: &Message| { &m.reject_hint },
|m: &mut Message| { &mut m.reject_hint },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"context",
|m: &Message| { &m.context },
|m: &mut Message| { &mut m.context },
));
::protobuf::reflect::MessageDescriptor::new::<Message>(
"Message",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Message {
static mut instance: ::protobuf::lazy::Lazy<Message> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Message,
};
unsafe {
instance.get(Message::new)
}
}
}
impl ::protobuf::Clear for Message {
fn clear(&mut self) {
self.msg_type = MessageType::MsgHup;
self.to = 0;
self.from = 0;
self.term = 0;
self.log_term = 0;
self.index = 0;
self.entries.clear();
self.commit = 0;
self.snapshot.clear();
self.request_snapshot = 0;
self.reject = false;
self.reject_hint = 0;
self.context.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Message {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Message {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct HardState {
pub term: u64,
pub vote: u64,
pub commit: u64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a HardState {
fn default() -> &'a HardState {
<HardState as ::protobuf::Message>::default_instance()
}
}
impl HardState {
pub fn new() -> HardState {
::std::default::Default::default()
}
pub fn get_term(&self) -> u64 {
self.term
}
pub fn clear_term(&mut self) {
self.term = 0;
}
pub fn set_term(&mut self, v: u64) {
self.term = v;
}
pub fn get_vote(&self) -> u64 {
self.vote
}
pub fn clear_vote(&mut self) {
self.vote = 0;
}
pub fn set_vote(&mut self, v: u64) {
self.vote = v;
}
pub fn get_commit(&self) -> u64 {
self.commit
}
pub fn clear_commit(&mut self) {
self.commit = 0;
}
pub fn set_commit(&mut self, v: u64) {
self.commit = v;
}
}
impl ::protobuf::Message for HardState {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.term = tmp;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.vote = tmp;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.commit = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.term != 0 {
my_size += ::protobuf::rt::value_size(1, self.term, ::protobuf::wire_format::WireTypeVarint);
}
if self.vote != 0 {
my_size += ::protobuf::rt::value_size(2, self.vote, ::protobuf::wire_format::WireTypeVarint);
}
if self.commit != 0 {
my_size += ::protobuf::rt::value_size(3, self.commit, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.term != 0 {
os.write_uint64(1, self.term)?;
}
if self.vote != 0 {
os.write_uint64(2, self.vote)?;
}
if self.commit != 0 {
os.write_uint64(3, self.commit)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> HardState {
HardState::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"term",
|m: &HardState| { &m.term },
|m: &mut HardState| { &mut m.term },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"vote",
|m: &HardState| { &m.vote },
|m: &mut HardState| { &mut m.vote },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"commit",
|m: &HardState| { &m.commit },
|m: &mut HardState| { &mut m.commit },
));
::protobuf::reflect::MessageDescriptor::new::<HardState>(
"HardState",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static HardState {
static mut instance: ::protobuf::lazy::Lazy<HardState> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const HardState,
};
unsafe {
instance.get(HardState::new)
}
}
}
impl ::protobuf::Clear for HardState {
fn clear(&mut self) {
self.term = 0;
self.vote = 0;
self.commit = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for HardState {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for HardState {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ConfState {
pub nodes: ::std::vec::Vec<u64>,
pub learners: ::std::vec::Vec<u64>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ConfState {
fn default() -> &'a ConfState {
<ConfState as ::protobuf::Message>::default_instance()
}
}
impl ConfState {
pub fn new() -> ConfState {
::std::default::Default::default()
}
pub fn get_nodes(&self) -> &[u64] {
&self.nodes
}
pub fn clear_nodes(&mut self) {
self.nodes.clear();
}
pub fn set_nodes(&mut self, v: ::std::vec::Vec<u64>) {
self.nodes = v;
}
pub fn mut_nodes(&mut self) -> &mut ::std::vec::Vec<u64> {
&mut self.nodes
}
pub fn take_nodes(&mut self) -> ::std::vec::Vec<u64> {
::std::mem::replace(&mut self.nodes, ::std::vec::Vec::new())
}
pub fn get_learners(&self) -> &[u64] {
&self.learners
}
pub fn clear_learners(&mut self) {
self.learners.clear();
}
pub fn set_learners(&mut self, v: ::std::vec::Vec<u64>) {
self.learners = v;
}
pub fn mut_learners(&mut self) -> &mut ::std::vec::Vec<u64> {
&mut self.learners
}
pub fn take_learners(&mut self) -> ::std::vec::Vec<u64> {
::std::mem::replace(&mut self.learners, ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for ConfState {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_uint64_into(wire_type, is, &mut self.nodes)?;
},
2 => {
::protobuf::rt::read_repeated_uint64_into(wire_type, is, &mut self.learners)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.nodes {
my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint);
};
for value in &self.learners {
my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint);
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
for v in &self.nodes {
os.write_uint64(1, *v)?;
};
for v in &self.learners {
os.write_uint64(2, *v)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ConfState {
ConfState::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"nodes",
|m: &ConfState| { &m.nodes },
|m: &mut ConfState| { &mut m.nodes },
));
fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"learners",
|m: &ConfState| { &m.learners },
|m: &mut ConfState| { &mut m.learners },
));
::protobuf::reflect::MessageDescriptor::new::<ConfState>(
"ConfState",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ConfState {
static mut instance: ::protobuf::lazy::Lazy<ConfState> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ConfState,
};
unsafe {
instance.get(ConfState::new)
}
}
}
impl ::protobuf::Clear for ConfState {
fn clear(&mut self) {
self.nodes.clear();
self.learners.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ConfState {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ConfState {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ConfChange {
pub id: u64,
pub change_type: ConfChangeType,
pub node_id: u64,
pub context: ::std::vec::Vec<u8>,
pub configuration: ::protobuf::SingularPtrField<ConfState>,
pub start_index: u64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ConfChange {
fn default() -> &'a ConfChange {
<ConfChange as ::protobuf::Message>::default_instance()
}
}
impl ConfChange {
pub fn new() -> ConfChange {
::std::default::Default::default()
}
pub fn get_id(&self) -> u64 {
self.id
}
pub fn clear_id(&mut self) {
self.id = 0;
}
pub fn set_id(&mut self, v: u64) {
self.id = v;
}
pub fn get_change_type(&self) -> ConfChangeType {
self.change_type
}
pub fn clear_change_type(&mut self) {
self.change_type = ConfChangeType::AddNode;
}
pub fn set_change_type(&mut self, v: ConfChangeType) {
self.change_type = v;
}
pub fn get_node_id(&self) -> u64 {
self.node_id
}
pub fn clear_node_id(&mut self) {
self.node_id = 0;
}
pub fn set_node_id(&mut self, v: u64) {
self.node_id = v;
}
pub fn get_context(&self) -> &[u8] {
&self.context
}
pub fn clear_context(&mut self) {
self.context.clear();
}
pub fn set_context(&mut self, v: ::std::vec::Vec<u8>) {
self.context = v;
}
pub fn mut_context(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.context
}
pub fn take_context(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.context, ::std::vec::Vec::new())
}
pub fn get_configuration(&self) -> &ConfState {
self.configuration.as_ref().unwrap_or_else(|| ConfState::default_instance())
}
pub fn clear_configuration(&mut self) {
self.configuration.clear();
}
pub fn has_configuration(&self) -> bool {
self.configuration.is_some()
}
pub fn set_configuration(&mut self, v: ConfState) {
self.configuration = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_configuration(&mut self) -> &mut ConfState {
if self.configuration.is_none() {
self.configuration.set_default();
}
self.configuration.as_mut().unwrap()
}
pub fn take_configuration(&mut self) -> ConfState {
self.configuration.take().unwrap_or_else(|| ConfState::new())
}
pub fn get_start_index(&self) -> u64 {
self.start_index
}
pub fn clear_start_index(&mut self) {
self.start_index = 0;
}
pub fn set_start_index(&mut self, v: u64) {
self.start_index = v;
}
}
impl ::protobuf::Message for ConfChange {
fn is_initialized(&self) -> bool {
for v in &self.configuration {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.id = tmp;
},
2 => {
if wire_type == ::protobuf::wire_format::WireTypeVarint {self.change_type = is.read_enum()?;} else {return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));}
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.node_id = tmp;
},
4 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.context)?;
},
5 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.configuration)?;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.start_index = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.id != 0 {
my_size += ::protobuf::rt::value_size(1, self.id, ::protobuf::wire_format::WireTypeVarint);
}
if self.change_type != ConfChangeType::AddNode {
my_size += ::protobuf::rt::enum_size(2, self.change_type);
}
if self.node_id != 0 {
my_size += ::protobuf::rt::value_size(3, self.node_id, ::protobuf::wire_format::WireTypeVarint);
}
if !self.context.is_empty() {
my_size += ::protobuf::rt::bytes_size(4, &self.context);
}
if let Some(ref v) = self.configuration.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.start_index != 0 {
my_size += ::protobuf::rt::value_size(6, self.start_index, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.id != 0 {
os.write_uint64(1, self.id)?;
}
if self.change_type != ConfChangeType::AddNode {
os.write_enum(2, self.change_type.value())?;
}
if self.node_id != 0 {
os.write_uint64(3, self.node_id)?;
}
if !self.context.is_empty() {
os.write_bytes(4, &self.context)?;
}
if let Some(ref v) = self.configuration.as_ref() {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.start_index != 0 {
os.write_uint64(6, self.start_index)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ConfChange {
ConfChange::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"id",
|m: &ConfChange| { &m.id },
|m: &mut ConfChange| { &mut m.id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ConfChangeType>>(
"change_type",
|m: &ConfChange| { &m.change_type },
|m: &mut ConfChange| { &mut m.change_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"node_id",
|m: &ConfChange| { &m.node_id },
|m: &mut ConfChange| { &mut m.node_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"context",
|m: &ConfChange| { &m.context },
|m: &mut ConfChange| { &mut m.context },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ConfState>>(
"configuration",
|m: &ConfChange| { &m.configuration },
|m: &mut ConfChange| { &mut m.configuration },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"start_index",
|m: &ConfChange| { &m.start_index },
|m: &mut ConfChange| { &mut m.start_index },
));
::protobuf::reflect::MessageDescriptor::new::<ConfChange>(
"ConfChange",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static ConfChange {
static mut instance: ::protobuf::lazy::Lazy<ConfChange> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ConfChange,
};
unsafe {
instance.get(ConfChange::new)
}
}
}
impl ::protobuf::Clear for ConfChange {
fn clear(&mut self) {
self.id = 0;
self.change_type = ConfChangeType::AddNode;
self.node_id = 0;
self.context.clear();
self.configuration.clear();
self.start_index = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ConfChange {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ConfChange {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum EntryType {
EntryNormal = 0,
EntryConfChange = 1,
}
impl ::protobuf::ProtobufEnum for EntryType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<EntryType> {
match value {
0 => ::std::option::Option::Some(EntryType::EntryNormal),
1 => ::std::option::Option::Some(EntryType::EntryConfChange),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [EntryType] = &[
EntryType::EntryNormal,
EntryType::EntryConfChange,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
};
unsafe {
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new("EntryType", file_descriptor_proto())
})
}
}
}
impl ::std::marker::Copy for EntryType {
}
impl ::std::default::Default for EntryType {
fn default() -> Self {
EntryType::EntryNormal
}
}
impl ::protobuf::reflect::ProtobufValue for EntryType {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum MessageType {
MsgHup = 0,
MsgBeat = 1,
MsgPropose = 2,
MsgAppend = 3,
MsgAppendResponse = 4,
MsgRequestVote = 5,
MsgRequestVoteResponse = 6,
MsgSnapshot = 7,
MsgHeartbeat = 8,
MsgHeartbeatResponse = 9,
MsgUnreachable = 10,
MsgSnapStatus = 11,
MsgCheckQuorum = 12,
MsgTransferLeader = 13,
MsgTimeoutNow = 14,
MsgReadIndex = 15,
MsgReadIndexResp = 16,
MsgRequestPreVote = 17,
MsgRequestPreVoteResponse = 18,
}
impl ::protobuf::ProtobufEnum for MessageType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<MessageType> {
match value {
0 => ::std::option::Option::Some(MessageType::MsgHup),
1 => ::std::option::Option::Some(MessageType::MsgBeat),
2 => ::std::option::Option::Some(MessageType::MsgPropose),
3 => ::std::option::Option::Some(MessageType::MsgAppend),
4 => ::std::option::Option::Some(MessageType::MsgAppendResponse),
5 => ::std::option::Option::Some(MessageType::MsgRequestVote),
6 => ::std::option::Option::Some(MessageType::MsgRequestVoteResponse),
7 => ::std::option::Option::Some(MessageType::MsgSnapshot),
8 => ::std::option::Option::Some(MessageType::MsgHeartbeat),
9 => ::std::option::Option::Some(MessageType::MsgHeartbeatResponse),
10 => ::std::option::Option::Some(MessageType::MsgUnreachable),
11 => ::std::option::Option::Some(MessageType::MsgSnapStatus),
12 => ::std::option::Option::Some(MessageType::MsgCheckQuorum),
13 => ::std::option::Option::Some(MessageType::MsgTransferLeader),
14 => ::std::option::Option::Some(MessageType::MsgTimeoutNow),
15 => ::std::option::Option::Some(MessageType::MsgReadIndex),
16 => ::std::option::Option::Some(MessageType::MsgReadIndexResp),
17 => ::std::option::Option::Some(MessageType::MsgRequestPreVote),
18 => ::std::option::Option::Some(MessageType::MsgRequestPreVoteResponse),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [MessageType] = &[
MessageType::MsgHup,
MessageType::MsgBeat,
MessageType::MsgPropose,
MessageType::MsgAppend,
MessageType::MsgAppendResponse,
MessageType::MsgRequestVote,
MessageType::MsgRequestVoteResponse,
MessageType::MsgSnapshot,
MessageType::MsgHeartbeat,
MessageType::MsgHeartbeatResponse,
MessageType::MsgUnreachable,
MessageType::MsgSnapStatus,
MessageType::MsgCheckQuorum,
MessageType::MsgTransferLeader,
MessageType::MsgTimeoutNow,
MessageType::MsgReadIndex,
MessageType::MsgReadIndexResp,
MessageType::MsgRequestPreVote,
MessageType::MsgRequestPreVoteResponse,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
};
unsafe {
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new("MessageType", file_descriptor_proto())
})
}
}
}
impl ::std::marker::Copy for MessageType {
}
impl ::std::default::Default for MessageType {
fn default() -> Self {
MessageType::MsgHup
}
}
impl ::protobuf::reflect::ProtobufValue for MessageType {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ConfChangeType {
AddNode = 0,
RemoveNode = 1,
AddLearnerNode = 2,
BeginMembershipChange = 3,
FinalizeMembershipChange = 4,
}
impl ::protobuf::ProtobufEnum for ConfChangeType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ConfChangeType> {
match value {
0 => ::std::option::Option::Some(ConfChangeType::AddNode),
1 => ::std::option::Option::Some(ConfChangeType::RemoveNode),
2 => ::std::option::Option::Some(ConfChangeType::AddLearnerNode),
3 => ::std::option::Option::Some(ConfChangeType::BeginMembershipChange),
4 => ::std::option::Option::Some(ConfChangeType::FinalizeMembershipChange),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ConfChangeType] = &[
ConfChangeType::AddNode,
ConfChangeType::RemoveNode,
ConfChangeType::AddLearnerNode,
ConfChangeType::BeginMembershipChange,
ConfChangeType::FinalizeMembershipChange,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
};
unsafe {
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new("ConfChangeType", file_descriptor_proto())
})
}
}
}
impl ::std::marker::Copy for ConfChangeType {
}
impl ::std::default::Default for ConfChangeType {
fn default() -> Self {
ConfChangeType::AddNode
}
}
impl ::protobuf::reflect::ProtobufValue for ConfChangeType {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\reraftpb.proto\x12\x07eraftpb\"\xad\x01\n\x05Entry\x121\n\nentry_type\
\x18\x01\x20\x01(\x0e2\x12.eraftpb.EntryTypeR\tentryType\x12\x12\n\x04te\
rm\x18\x02\x20\x01(\x04R\x04term\x12\x14\n\x05index\x18\x03\x20\x01(\x04\
R\x05index\x12\x12\n\x04data\x18\x04\x20\x01(\x0cR\x04data\x12\x18\n\x07\
context\x18\x06\x20\x01(\x0cR\x07context\x12\x19\n\x08sync_log\x18\x05\
\x20\x01(\x08R\x07syncLog\"\x86\x02\n\x10SnapshotMetadata\x121\n\nconf_s\
tate\x18\x01\x20\x01(\x0b2\x12.eraftpb.ConfStateR\tconfState\x12N\n\x19p\
ending_membership_change\x18\x04\x20\x01(\x0b2\x12.eraftpb.ConfStateR\
\x17pendingMembershipChange\x12E\n\x1fpending_membership_change_index\
\x18\x05\x20\x01(\x04R\x1cpendingMembershipChangeIndex\x12\x14\n\x05inde\
x\x18\x02\x20\x01(\x04R\x05index\x12\x12\n\x04term\x18\x03\x20\x01(\x04R\
\x04term\"U\n\x08Snapshot\x12\x12\n\x04data\x18\x01\x20\x01(\x0cR\x04dat\
a\x125\n\x08metadata\x18\x02\x20\x01(\x0b2\x19.eraftpb.SnapshotMetadataR\
\x08metadata\"\x92\x03\n\x07Message\x12/\n\x08msg_type\x18\x01\x20\x01(\
\x0e2\x14.eraftpb.MessageTypeR\x07msgType\x12\x0e\n\x02to\x18\x02\x20\
\x01(\x04R\x02to\x12\x12\n\x04from\x18\x03\x20\x01(\x04R\x04from\x12\x12\
\n\x04term\x18\x04\x20\x01(\x04R\x04term\x12\x19\n\x08log_term\x18\x05\
\x20\x01(\x04R\x07logTerm\x12\x14\n\x05index\x18\x06\x20\x01(\x04R\x05in\
dex\x12(\n\x07entries\x18\x07\x20\x03(\x0b2\x0e.eraftpb.EntryR\x07entrie\
s\x12\x16\n\x06commit\x18\x08\x20\x01(\x04R\x06commit\x12-\n\x08snapshot\
\x18\t\x20\x01(\x0b2\x11.eraftpb.SnapshotR\x08snapshot\x12)\n\x10request\
_snapshot\x18\r\x20\x01(\x04R\x0frequestSnapshot\x12\x16\n\x06reject\x18\
\n\x20\x01(\x08R\x06reject\x12\x1f\n\x0breject_hint\x18\x0b\x20\x01(\x04\
R\nrejectHint\x12\x18\n\x07context\x18\x0c\x20\x01(\x0cR\x07context\"K\n\
\tHardState\x12\x12\n\x04term\x18\x01\x20\x01(\x04R\x04term\x12\x12\n\
\x04vote\x18\x02\x20\x01(\x04R\x04vote\x12\x16\n\x06commit\x18\x03\x20\
\x01(\x04R\x06commit\"=\n\tConfState\x12\x14\n\x05nodes\x18\x01\x20\x03(\
\x04R\x05nodes\x12\x1a\n\x08learners\x18\x02\x20\x03(\x04R\x08learners\"\
\xe4\x01\n\nConfChange\x12\x0e\n\x02id\x18\x01\x20\x01(\x04R\x02id\x128\
\n\x0bchange_type\x18\x02\x20\x01(\x0e2\x17.eraftpb.ConfChangeTypeR\ncha\
ngeType\x12\x17\n\x07node_id\x18\x03\x20\x01(\x04R\x06nodeId\x12\x18\n\
\x07context\x18\x04\x20\x01(\x0cR\x07context\x128\n\rconfiguration\x18\
\x05\x20\x01(\x0b2\x12.eraftpb.ConfStateR\rconfiguration\x12\x1f\n\x0bst\
art_index\x18\x06\x20\x01(\x04R\nstartIndex*1\n\tEntryType\x12\x0f\n\x0b\
EntryNormal\x10\0\x12\x13\n\x0fEntryConfChange\x10\x01*\x8c\x03\n\x0bMes\
sageType\x12\n\n\x06MsgHup\x10\0\x12\x0b\n\x07MsgBeat\x10\x01\x12\x0e\n\
\nMsgPropose\x10\x02\x12\r\n\tMsgAppend\x10\x03\x12\x15\n\x11MsgAppendRe\
sponse\x10\x04\x12\x12\n\x0eMsgRequestVote\x10\x05\x12\x1a\n\x16MsgReque\
stVoteResponse\x10\x06\x12\x0f\n\x0bMsgSnapshot\x10\x07\x12\x10\n\x0cMsg\
Heartbeat\x10\x08\x12\x18\n\x14MsgHeartbeatResponse\x10\t\x12\x12\n\x0eM\
sgUnreachable\x10\n\x12\x11\n\rMsgSnapStatus\x10\x0b\x12\x12\n\x0eMsgChe\
ckQuorum\x10\x0c\x12\x15\n\x11MsgTransferLeader\x10\r\x12\x11\n\rMsgTime\
outNow\x10\x0e\x12\x10\n\x0cMsgReadIndex\x10\x0f\x12\x14\n\x10MsgReadInd\
exResp\x10\x10\x12\x15\n\x11MsgRequestPreVote\x10\x11\x12\x1d\n\x19MsgRe\
questPreVoteResponse\x10\x12*z\n\x0eConfChangeType\x12\x0b\n\x07AddNode\
\x10\0\x12\x0e\n\nRemoveNode\x10\x01\x12\x12\n\x0eAddLearnerNode\x10\x02\
\x12\x19\n\x15BeginMembershipChange\x10\x03\x12\x1c\n\x18FinalizeMembers\
hipChange\x10\x04J\xca&\n\x06\x12\x04\0\0p\x01\n\x08\n\x01\x0c\x12\x03\0\
\0\x12\n\x08\n\x01\x02\x12\x03\x01\0\x10\n\n\n\x02\x05\0\x12\x04\x03\0\
\x06\x01\n\n\n\x03\x05\0\x01\x12\x03\x03\x05\x0e\n\x0b\n\x04\x05\0\x02\0\
\x12\x03\x04\x04\x14\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x04\x04\x0f\n\
\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x04\x12\x13\n\x0b\n\x04\x05\0\x02\x01\
\x12\x03\x05\x04\x18\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x05\x04\x13\n\
\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x05\x16\x17\n\xdd\x04\n\x02\x04\0\
\x12\x04\x12\0\x1c\x01\x1a\xd0\x04\x20The\x20entry\x20is\x20a\x20type\
\x20of\x20change\x20that\x20needs\x20to\x20be\x20applied.\x20It\x20conta\
ins\x20two\x20data\x20fields.\n\x20While\x20the\x20fields\x20are\x20buil\
t\x20into\x20the\x20model;\x20their\x20usage\x20is\x20determined\x20by\
\x20the\x20entry_type.\n\n\x20For\x20normal\x20entries,\x20the\x20data\
\x20field\x20should\x20contain\x20the\x20data\x20change\x20that\x20shoul\
d\x20be\x20applied.\n\x20The\x20context\x20field\x20can\x20be\x20used\
\x20for\x20any\x20contextual\x20data\x20that\x20might\x20be\x20relevant\
\x20to\x20the\n\x20application\x20of\x20the\x20data.\n\n\x20For\x20confi\
guration\x20changes,\x20the\x20data\x20will\x20contain\x20the\x20ConfCha\
nge\x20message\x20and\x20the\n\x20context\x20will\x20provide\x20anything\
\x20needed\x20to\x20assist\x20the\x20configuration\x20change.\x20The\x20\
context\n\x20if\x20for\x20the\x20user\x20to\x20set\x20and\x20use\x20in\
\x20this\x20case.\n\n\n\n\x03\x04\0\x01\x12\x03\x12\x08\r\n\x0b\n\x04\
\x04\0\x02\0\x12\x03\x13\x04\x1d\n\r\n\x05\x04\0\x02\0\x04\x12\x04\x13\
\x04\x12\x0f\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x13\x04\r\n\x0c\n\x05\
\x04\0\x02\0\x01\x12\x03\x13\x0e\x18\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\
\x13\x1b\x1c\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x14\x04\x14\n\r\n\x05\x04\
\0\x02\x01\x04\x12\x04\x14\x04\x13\x1d\n\x0c\n\x05\x04\0\x02\x01\x05\x12\
\x03\x14\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x14\x0b\x0f\n\x0c\n\
\x05\x04\0\x02\x01\x03\x12\x03\x14\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\
\x03\x15\x04\x15\n\r\n\x05\x04\0\x02\x02\x04\x12\x04\x15\x04\x14\x14\n\
\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x15\x04\n\n\x0c\n\x05\x04\0\x02\x02\
\x01\x12\x03\x15\x0b\x10\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x15\x13\
\x14\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x16\x04\x13\n\r\n\x05\x04\0\x02\
\x03\x04\x12\x04\x16\x04\x15\x15\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\
\x16\x04\t\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x16\n\x0e\n\x0c\n\x05\
\x04\0\x02\x03\x03\x12\x03\x16\x11\x12\n\x0b\n\x04\x04\0\x02\x04\x12\x03\
\x17\x04\x16\n\r\n\x05\x04\0\x02\x04\x04\x12\x04\x17\x04\x16\x13\n\x0c\n\
\x05\x04\0\x02\x04\x05\x12\x03\x17\x04\t\n\x0c\n\x05\x04\0\x02\x04\x01\
\x12\x03\x17\n\x11\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x17\x14\x15\nm\
\n\x04\x04\0\x02\x05\x12\x03\x1b\x04\x16\x1a`\x20Deprecated!\x20It\x20is\
\x20kept\x20for\x20backward\x20compatibility.\n\x20TODO:\x20remove\x20it\
\x20in\x20the\x20next\x20major\x20release.\n\n\r\n\x05\x04\0\x02\x05\x04\
\x12\x04\x1b\x04\x17\x16\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\x1b\x04\
\x08\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x03\x1b\t\x11\n\x0c\n\x05\x04\0\
\x02\x05\x03\x12\x03\x1b\x14\x15\n\n\n\x02\x04\x01\x12\x04\x1e\0$\x01\n\
\n\n\x03\x04\x01\x01\x12\x03\x1e\x08\x18\n\x0b\n\x04\x04\x01\x02\0\x12\
\x03\x1f\x04\x1d\n\r\n\x05\x04\x01\x02\0\x04\x12\x04\x1f\x04\x1e\x1a\n\
\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x1f\x04\r\n\x0c\n\x05\x04\x01\x02\0\
\x01\x12\x03\x1f\x0e\x18\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1f\x1b\
\x1c\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x20\x04,\n\r\n\x05\x04\x01\x02\
\x01\x04\x12\x04\x20\x04\x1f\x1d\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03\
\x20\x04\r\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x0e'\n\x0c\n\x05\
\x04\x01\x02\x01\x03\x12\x03\x20*+\n\x0b\n\x04\x04\x01\x02\x02\x12\x03!\
\x04/\n\r\n\x05\x04\x01\x02\x02\x04\x12\x04!\x04\x20,\n\x0c\n\x05\x04\
\x01\x02\x02\x05\x12\x03!\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03!\
\x0b*\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03!-.\n\x0b\n\x04\x04\x01\x02\
\x03\x12\x03\"\x04\x15\n\r\n\x05\x04\x01\x02\x03\x04\x12\x04\"\x04!/\n\
\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03\"\x04\n\n\x0c\n\x05\x04\x01\x02\
\x03\x01\x12\x03\"\x0b\x10\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\"\x13\
\x14\n\x0b\n\x04\x04\x01\x02\x04\x12\x03#\x04\x14\n\r\n\x05\x04\x01\x02\
\x04\x04\x12\x04#\x04\"\x15\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\x03#\x04\
\n\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x03#\x0b\x0f\n\x0c\n\x05\x04\x01\
\x02\x04\x03\x12\x03#\x12\x13\n\n\n\x02\x04\x02\x12\x04&\0)\x01\n\n\n\
\x03\x04\x02\x01\x12\x03&\x08\x10\n\x0b\n\x04\x04\x02\x02\0\x12\x03'\x04\
\x13\n\r\n\x05\x04\x02\x02\0\x04\x12\x04'\x04&\x12\n\x0c\n\x05\x04\x02\
\x02\0\x05\x12\x03'\x04\t\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03'\n\x0e\n\
\x0c\n\x05\x04\x02\x02\0\x03\x12\x03'\x11\x12\n\x0b\n\x04\x04\x02\x02\
\x01\x12\x03(\x04\"\n\r\n\x05\x04\x02\x02\x01\x04\x12\x04(\x04'\x13\n\
\x0c\n\x05\x04\x02\x02\x01\x06\x12\x03(\x04\x14\n\x0c\n\x05\x04\x02\x02\
\x01\x01\x12\x03(\x15\x1d\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03(\x20!\
\n\n\n\x02\x05\x01\x12\x04+\0?\x01\n\n\n\x03\x05\x01\x01\x12\x03+\x05\
\x10\n\x0b\n\x04\x05\x01\x02\0\x12\x03,\x04\x0f\n\x0c\n\x05\x05\x01\x02\
\0\x01\x12\x03,\x04\n\n\x0c\n\x05\x05\x01\x02\0\x02\x12\x03,\r\x0e\n\x0b\
\n\x04\x05\x01\x02\x01\x12\x03-\x04\x10\n\x0c\n\x05\x05\x01\x02\x01\x01\
\x12\x03-\x04\x0b\n\x0c\n\x05\x05\x01\x02\x01\x02\x12\x03-\x0e\x0f\n\x0b\
\n\x04\x05\x01\x02\x02\x12\x03.\x04\x13\n\x0c\n\x05\x05\x01\x02\x02\x01\
\x12\x03.\x04\x0e\n\x0c\n\x05\x05\x01\x02\x02\x02\x12\x03.\x11\x12\n\x0b\
\n\x04\x05\x01\x02\x03\x12\x03/\x04\x12\n\x0c\n\x05\x05\x01\x02\x03\x01\
\x12\x03/\x04\r\n\x0c\n\x05\x05\x01\x02\x03\x02\x12\x03/\x10\x11\n\x0b\n\
\x04\x05\x01\x02\x04\x12\x030\x04\x1a\n\x0c\n\x05\x05\x01\x02\x04\x01\
\x12\x030\x04\x15\n\x0c\n\x05\x05\x01\x02\x04\x02\x12\x030\x18\x19\n\x0b\
\n\x04\x05\x01\x02\x05\x12\x031\x04\x17\n\x0c\n\x05\x05\x01\x02\x05\x01\
\x12\x031\x04\x12\n\x0c\n\x05\x05\x01\x02\x05\x02\x12\x031\x15\x16\n\x0b\
\n\x04\x05\x01\x02\x06\x12\x032\x04\x1f\n\x0c\n\x05\x05\x01\x02\x06\x01\
\x12\x032\x04\x1a\n\x0c\n\x05\x05\x01\x02\x06\x02\x12\x032\x1d\x1e\n\x0b\
\n\x04\x05\x01\x02\x07\x12\x033\x04\x14\n\x0c\n\x05\x05\x01\x02\x07\x01\
\x12\x033\x04\x0f\n\x0c\n\x05\x05\x01\x02\x07\x02\x12\x033\x12\x13\n\x0b\
\n\x04\x05\x01\x02\x08\x12\x034\x04\x15\n\x0c\n\x05\x05\x01\x02\x08\x01\
\x12\x034\x04\x10\n\x0c\n\x05\x05\x01\x02\x08\x02\x12\x034\x13\x14\n\x0b\
\n\x04\x05\x01\x02\t\x12\x035\x04\x1d\n\x0c\n\x05\x05\x01\x02\t\x01\x12\
\x035\x04\x18\n\x0c\n\x05\x05\x01\x02\t\x02\x12\x035\x1b\x1c\n\x0b\n\x04\
\x05\x01\x02\n\x12\x036\x04\x18\n\x0c\n\x05\x05\x01\x02\n\x01\x12\x036\
\x04\x12\n\x0c\n\x05\x05\x01\x02\n\x02\x12\x036\x15\x17\n\x0b\n\x04\x05\
\x01\x02\x0b\x12\x037\x04\x17\n\x0c\n\x05\x05\x01\x02\x0b\x01\x12\x037\
\x04\x11\n\x0c\n\x05\x05\x01\x02\x0b\x02\x12\x037\x14\x16\n\x0b\n\x04\
\x05\x01\x02\x0c\x12\x038\x04\x18\n\x0c\n\x05\x05\x01\x02\x0c\x01\x12\
\x038\x04\x12\n\x0c\n\x05\x05\x01\x02\x0c\x02\x12\x038\x15\x17\n\x0b\n\
\x04\x05\x01\x02\r\x12\x039\x04\x1b\n\x0c\n\x05\x05\x01\x02\r\x01\x12\
\x039\x04\x15\n\x0c\n\x05\x05\x01\x02\r\x02\x12\x039\x18\x1a\n\x0b\n\x04\
\x05\x01\x02\x0e\x12\x03:\x04\x17\n\x0c\n\x05\x05\x01\x02\x0e\x01\x12\
\x03:\x04\x11\n\x0c\n\x05\x05\x01\x02\x0e\x02\x12\x03:\x14\x16\n\x0b\n\
\x04\x05\x01\x02\x0f\x12\x03;\x04\x16\n\x0c\n\x05\x05\x01\x02\x0f\x01\
\x12\x03;\x04\x10\n\x0c\n\x05\x05\x01\x02\x0f\x02\x12\x03;\x13\x15\n\x0b\
\n\x04\x05\x01\x02\x10\x12\x03<\x04\x1a\n\x0c\n\x05\x05\x01\x02\x10\x01\
\x12\x03<\x04\x14\n\x0c\n\x05\x05\x01\x02\x10\x02\x12\x03<\x17\x19\n\x0b\
\n\x04\x05\x01\x02\x11\x12\x03=\x04\x1b\n\x0c\n\x05\x05\x01\x02\x11\x01\
\x12\x03=\x04\x15\n\x0c\n\x05\x05\x01\x02\x11\x02\x12\x03=\x18\x1a\n\x0b\
\n\x04\x05\x01\x02\x12\x12\x03>\x04#\n\x0c\n\x05\x05\x01\x02\x12\x01\x12\
\x03>\x04\x1d\n\x0c\n\x05\x05\x01\x02\x12\x02\x12\x03>\x20\"\n\n\n\x02\
\x04\x03\x12\x04A\0O\x01\n\n\n\x03\x04\x03\x01\x12\x03A\x08\x0f\n\x0b\n\
\x04\x04\x03\x02\0\x12\x03B\x04\x1d\n\r\n\x05\x04\x03\x02\0\x04\x12\x04B\
\x04A\x11\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03B\x04\x0f\n\x0c\n\x05\x04\
\x03\x02\0\x01\x12\x03B\x10\x18\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03B\
\x1b\x1c\n\x0b\n\x04\x04\x03\x02\x01\x12\x03C\x04\x12\n\r\n\x05\x04\x03\
\x02\x01\x04\x12\x04C\x04B\x1d\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03C\
\x04\n\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x03C\x0b\r\n\x0c\n\x05\x04\
\x03\x02\x01\x03\x12\x03C\x10\x11\n\x0b\n\x04\x04\x03\x02\x02\x12\x03D\
\x04\x14\n\r\n\x05\x04\x03\x02\x02\x04\x12\x04D\x04C\x12\n\x0c\n\x05\x04\
\x03\x02\x02\x05\x12\x03D\x04\n\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03D\
\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03D\x12\x13\n\x0b\n\x04\
\x04\x03\x02\x03\x12\x03E\x04\x14\n\r\n\x05\x04\x03\x02\x03\x04\x12\x04E\
\x04D\x14\n\x0c\n\x05\x04\x03\x02\x03\x05\x12\x03E\x04\n\n\x0c\n\x05\x04\
\x03\x02\x03\x01\x12\x03E\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\
\x03E\x12\x13\n\x0b\n\x04\x04\x03\x02\x04\x12\x03F\x04\x18\n\r\n\x05\x04\
\x03\x02\x04\x04\x12\x04F\x04E\x14\n\x0c\n\x05\x04\x03\x02\x04\x05\x12\
\x03F\x04\n\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03F\x0b\x13\n\x0c\n\x05\
\x04\x03\x02\x04\x03\x12\x03F\x16\x17\n\x0b\n\x04\x04\x03\x02\x05\x12\
\x03G\x04\x15\n\r\n\x05\x04\x03\x02\x05\x04\x12\x04G\x04F\x18\n\x0c\n\
\x05\x04\x03\x02\x05\x05\x12\x03G\x04\n\n\x0c\n\x05\x04\x03\x02\x05\x01\
\x12\x03G\x0b\x10\n\x0c\n\x05\x04\x03\x02\x05\x03\x12\x03G\x13\x14\n\x0b\
\n\x04\x04\x03\x02\x06\x12\x03H\x04\x1f\n\x0c\n\x05\x04\x03\x02\x06\x04\
\x12\x03H\x04\x0c\n\x0c\n\x05\x04\x03\x02\x06\x06\x12\x03H\r\x12\n\x0c\n\
\x05\x04\x03\x02\x06\x01\x12\x03H\x13\x1a\n\x0c\n\x05\x04\x03\x02\x06\
\x03\x12\x03H\x1d\x1e\n\x0b\n\x04\x04\x03\x02\x07\x12\x03I\x04\x16\n\r\n\
\x05\x04\x03\x02\x07\x04\x12\x04I\x04H\x1f\n\x0c\n\x05\x04\x03\x02\x07\
\x05\x12\x03I\x04\n\n\x0c\n\x05\x04\x03\x02\x07\x01\x12\x03I\x0b\x11\n\
\x0c\n\x05\x04\x03\x02\x07\x03\x12\x03I\x14\x15\n\x0b\n\x04\x04\x03\x02\
\x08\x12\x03J\x04\x1a\n\r\n\x05\x04\x03\x02\x08\x04\x12\x04J\x04I\x16\n\
\x0c\n\x05\x04\x03\x02\x08\x06\x12\x03J\x04\x0c\n\x0c\n\x05\x04\x03\x02\
\x08\x01\x12\x03J\r\x15\n\x0c\n\x05\x04\x03\x02\x08\x03\x12\x03J\x18\x19\
\n\x0b\n\x04\x04\x03\x02\t\x12\x03K\x04!\n\r\n\x05\x04\x03\x02\t\x04\x12\
\x04K\x04J\x1a\n\x0c\n\x05\x04\x03\x02\t\x05\x12\x03K\x04\n\n\x0c\n\x05\
\x04\x03\x02\t\x01\x12\x03K\x0b\x1b\n\x0c\n\x05\x04\x03\x02\t\x03\x12\
\x03K\x1e\x20\n\x0b\n\x04\x04\x03\x02\n\x12\x03L\x04\x15\n\r\n\x05\x04\
\x03\x02\n\x04\x12\x04L\x04K!\n\x0c\n\x05\x04\x03\x02\n\x05\x12\x03L\x04\
\x08\n\x0c\n\x05\x04\x03\x02\n\x01\x12\x03L\t\x0f\n\x0c\n\x05\x04\x03\
\x02\n\x03\x12\x03L\x12\x14\n\x0b\n\x04\x04\x03\x02\x0b\x12\x03M\x04\x1c\
\n\r\n\x05\x04\x03\x02\x0b\x04\x12\x04M\x04L\x15\n\x0c\n\x05\x04\x03\x02\
\x0b\x05\x12\x03M\x04\n\n\x0c\n\x05\x04\x03\x02\x0b\x01\x12\x03M\x0b\x16\
\n\x0c\n\x05\x04\x03\x02\x0b\x03\x12\x03M\x19\x1b\n\x0b\n\x04\x04\x03\
\x02\x0c\x12\x03N\x04\x17\n\r\n\x05\x04\x03\x02\x0c\x04\x12\x04N\x04M\
\x1c\n\x0c\n\x05\x04\x03\x02\x0c\x05\x12\x03N\x04\t\n\x0c\n\x05\x04\x03\
\x02\x0c\x01\x12\x03N\n\x11\n\x0c\n\x05\x04\x03\x02\x0c\x03\x12\x03N\x14\
\x16\n\n\n\x02\x04\x04\x12\x04Q\0U\x01\n\n\n\x03\x04\x04\x01\x12\x03Q\
\x08\x11\n\x0b\n\x04\x04\x04\x02\0\x12\x03R\x04\x14\n\r\n\x05\x04\x04\
\x02\0\x04\x12\x04R\x04Q\x13\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03R\x04\
\n\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03R\x0b\x0f\n\x0c\n\x05\x04\x04\
\x02\0\x03\x12\x03R\x12\x13\n\x0b\n\x04\x04\x04\x02\x01\x12\x03S\x04\x14\
\n\r\n\x05\x04\x04\x02\x01\x04\x12\x04S\x04R\x14\n\x0c\n\x05\x04\x04\x02\
\x01\x05\x12\x03S\x04\n\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03S\x0b\x0f\
\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03S\x12\x13\n\x0b\n\x04\x04\x04\
\x02\x02\x12\x03T\x04\x16\n\r\n\x05\x04\x04\x02\x02\x04\x12\x04T\x04S\
\x14\n\x0c\n\x05\x04\x04\x02\x02\x05\x12\x03T\x04\n\n\x0c\n\x05\x04\x04\
\x02\x02\x01\x12\x03T\x0b\x11\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03T\
\x14\x15\n\n\n\x02\x04\x05\x12\x04W\0Z\x01\n\n\n\x03\x04\x05\x01\x12\x03\
W\x08\x11\n\x0b\n\x04\x04\x05\x02\0\x12\x03X\x04\x1e\n\x0c\n\x05\x04\x05\
\x02\0\x04\x12\x03X\x04\x0c\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03X\r\x13\
\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03X\x14\x19\n\x0c\n\x05\x04\x05\x02\
\0\x03\x12\x03X\x1c\x1d\n\x0b\n\x04\x04\x05\x02\x01\x12\x03Y\x04!\n\x0c\
\n\x05\x04\x05\x02\x01\x04\x12\x03Y\x04\x0c\n\x0c\n\x05\x04\x05\x02\x01\
\x05\x12\x03Y\r\x13\n\x0c\n\x05\x04\x05\x02\x01\x01\x12\x03Y\x14\x1c\n\
\x0c\n\x05\x04\x05\x02\x01\x03\x12\x03Y\x1f\x20\n\n\n\x02\x05\x02\x12\
\x04\\\0b\x01\n\n\n\x03\x05\x02\x01\x12\x03\\\x05\x13\n\x0b\n\x04\x05\
\x02\x02\0\x12\x03]\x04\x13\n\x0c\n\x05\x05\x02\x02\0\x01\x12\x03]\x04\
\x0b\n\x0c\n\x05\x05\x02\x02\0\x02\x12\x03]\x11\x12\n\x0b\n\x04\x05\x02\
\x02\x01\x12\x03^\x04\x13\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03^\x04\
\x0e\n\x0c\n\x05\x05\x02\x02\x01\x02\x12\x03^\x11\x12\n\x0b\n\x04\x05\
\x02\x02\x02\x12\x03_\x04\x17\n\x0c\n\x05\x05\x02\x02\x02\x01\x12\x03_\
\x04\x12\n\x0c\n\x05\x05\x02\x02\x02\x02\x12\x03_\x15\x16\n\x0b\n\x04\
\x05\x02\x02\x03\x12\x03`\x04\x1e\n\x0c\n\x05\x05\x02\x02\x03\x01\x12\
\x03`\x04\x19\n\x0c\n\x05\x05\x02\x02\x03\x02\x12\x03`\x1c\x1d\n\x0b\n\
\x04\x05\x02\x02\x04\x12\x03a\x04!\n\x0c\n\x05\x05\x02\x02\x04\x01\x12\
\x03a\x04\x1c\n\x0c\n\x05\x05\x02\x02\x04\x02\x12\x03a\x1f\x20\n\n\n\x02\
\x04\x06\x12\x04d\0p\x01\n\n\n\x03\x04\x06\x01\x12\x03d\x08\x12\n\x0b\n\
\x04\x04\x06\x02\0\x12\x03e\x04\x12\n\r\n\x05\x04\x06\x02\0\x04\x12\x04e\
\x04d\x14\n\x0c\n\x05\x04\x06\x02\0\x05\x12\x03e\x04\n\n\x0c\n\x05\x04\
\x06\x02\0\x01\x12\x03e\x0b\r\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03e\x10\
\x11\n\x0b\n\x04\x04\x06\x02\x01\x12\x03f\x04#\n\r\n\x05\x04\x06\x02\x01\
\x04\x12\x04f\x04e\x12\n\x0c\n\x05\x04\x06\x02\x01\x06\x12\x03f\x04\x12\
\n\x0c\n\x05\x04\x06\x02\x01\x01\x12\x03f\x13\x1e\n\x0c\n\x05\x04\x06\
\x02\x01\x03\x12\x03f!\"\nE\n\x04\x04\x06\x02\x02\x12\x03h\x04\x17\x1a8\
\x20Used\x20in\x20`AddNode`,\x20`RemoveNode`,\x20and\x20`AddLearnerNode`\
.\n\n\r\n\x05\x04\x06\x02\x02\x04\x12\x04h\x04f#\n\x0c\n\x05\x04\x06\x02\
\x02\x05\x12\x03h\x04\n\n\x0c\n\x05\x04\x06\x02\x02\x01\x12\x03h\x0b\x12\
\n\x0c\n\x05\x04\x06\x02\x02\x03\x12\x03h\x15\x16\n\x0b\n\x04\x04\x06\
\x02\x03\x12\x03i\x04\x16\n\r\n\x05\x04\x06\x02\x03\x04\x12\x04i\x04h\
\x17\n\x0c\n\x05\x04\x06\x02\x03\x05\x12\x03i\x04\t\n\x0c\n\x05\x04\x06\
\x02\x03\x01\x12\x03i\n\x11\n\x0c\n\x05\x04\x06\x02\x03\x03\x12\x03i\x14\
\x15\nN\n\x04\x04\x06\x02\x04\x12\x03k\x04\x20\x1aA\x20Used\x20in\x20`Be\
ginMembershipChange`\x20and\x20`FinalizeMembershipChange`.\n\n\r\n\x05\
\x04\x06\x02\x04\x04\x12\x04k\x04i\x16\n\x0c\n\x05\x04\x06\x02\x04\x06\
\x12\x03k\x04\r\n\x0c\n\x05\x04\x06\x02\x04\x01\x12\x03k\x0e\x1b\n\x0c\n\
\x05\x04\x06\x02\x04\x03\x12\x03k\x1e\x1f\n\xd0\x01\n\x04\x04\x06\x02\
\x05\x12\x03o\x04\x1b\x1a\xc2\x01\x20Used\x20in\x20`BeginMembershipChang\
e`\x20and\x20`FinalizeMembershipChange`.\n\x20Because\x20`RawNode::apply\
_conf_change`\x20takes\x20a\x20`ConfChange`\x20instead\x20of\x20an\x20`E\
ntry`\x20we\x20must\n\x20include\x20this\x20index\x20so\x20it\x20can\x20\
be\x20known.\n\n\r\n\x05\x04\x06\x02\x05\x04\x12\x04o\x04k\x20\n\x0c\n\
\x05\x04\x06\x02\x05\x05\x12\x03o\x04\n\n\x0c\n\x05\x04\x06\x02\x05\x01\
\x12\x03o\x0b\x16\n\x0c\n\x05\x04\x06\x02\x05\x03\x12\x03o\x19\x1ab\x06p\
roto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}