bayard-proto 0.8.2

Protocol Buffers for Bayard
// This file is generated by rust-protobuf 2.17.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![rustfmt::skip]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `commonpb.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_17_0;

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum State {
    OK = 0,
    WRONG_LEADER = 1,
    NOT_FOUND = 2,
    IO_ERROR = 3,
}

impl ::protobuf::ProtobufEnum for State {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<State> {
        match value {
            0 => ::std::option::Option::Some(State::OK),
            1 => ::std::option::Option::Some(State::WRONG_LEADER),
            2 => ::std::option::Option::Some(State::NOT_FOUND),
            3 => ::std::option::Option::Some(State::IO_ERROR),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [State] = &[
            State::OK,
            State::WRONG_LEADER,
            State::NOT_FOUND,
            State::IO_ERROR,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<State>("State", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for State {
}

impl ::std::default::Default for State {
    fn default() -> Self {
        State::OK
    }
}

impl ::protobuf::reflect::ProtobufValue for State {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x0ecommonpb.proto\x12\rbayard.common*>\n\x05State\x12\x06\n\x02OK\x10\
    \0\x12\x10\n\x0cWRONG_LEADER\x10\x01\x12\r\n\tNOT_FOUND\x10\x02\x12\x0c\
    \n\x08IO_ERROR\x10\x03B\x0bZ\tpkg/protoJ\xed\x01\n\x06\x12\x04\0\0\x0b\
    \x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\x08\x15\
    \n\x08\n\x01\x08\x12\x03\x04\0\x20\n\t\n\x02\x08\x0b\x12\x03\x04\0\x20\n\
    \n\n\x02\x05\0\x12\x04\x06\0\x0b\x01\n\n\n\x03\x05\0\x01\x12\x03\x06\x05\
    \n\n\x0b\n\x04\x05\0\x02\0\x12\x03\x07\x04\x0b\n\x0c\n\x05\x05\0\x02\0\
    \x01\x12\x03\x07\x04\x06\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x07\t\n\n\
    \x0b\n\x04\x05\0\x02\x01\x12\x03\x08\x04\x15\n\x0c\n\x05\x05\0\x02\x01\
    \x01\x12\x03\x08\x04\x10\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x08\x13\
    \x14\n\x0b\n\x04\x05\0\x02\x02\x12\x03\t\x04\x12\n\x0c\n\x05\x05\0\x02\
    \x02\x01\x12\x03\t\x04\r\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\t\x10\x11\
    \n\x0b\n\x04\x05\0\x02\x03\x12\x03\n\x04\x11\n\x0c\n\x05\x05\0\x02\x03\
    \x01\x12\x03\n\x04\x0c\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\n\x0f\x10b\
    \x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

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 {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}