catalyst-protocol-sdk-rust 0.1.5

Protocol Specification for Catalyst Network
Documentation
// This file is generated by rust-protobuf 2.10.0. Do not edit
// @generated

// https://github.com/Manishearth/rust-clippy/issues/702
#![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)]
//! Generated file from `Network.proto`

use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;

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

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum NetworkType {
    NETWORK_TYPE_UNKNOWN = 0,
    MAINNET = 1,
    DEVNET = 2,
    TESTNET = 3,
}

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

    fn from_i32(value: i32) -> ::std::option::Option<NetworkType> {
        match value {
            0 => ::std::option::Option::Some(NetworkType::NETWORK_TYPE_UNKNOWN),
            1 => ::std::option::Option::Some(NetworkType::MAINNET),
            2 => ::std::option::Option::Some(NetworkType::DEVNET),
            3 => ::std::option::Option::Some(NetworkType::TESTNET),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [NetworkType] = &[
            NetworkType::NETWORK_TYPE_UNKNOWN,
            NetworkType::MAINNET,
            NetworkType::DEVNET,
            NetworkType::TESTNET,
        ];
        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("NetworkType", file_descriptor_proto())
            })
        }
    }
}

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

impl ::std::default::Default for NetworkType {
    fn default() -> Self {
        NetworkType::NETWORK_TYPE_UNKNOWN
    }
}

impl ::protobuf::reflect::ProtobufValue for NetworkType {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\rNetwork.proto\x12\x19Catalyst.Protocol.Network*M\n\x0bNetworkType\
    \x12\x18\n\x14NETWORK_TYPE_UNKNOWN\x10\0\x12\x0b\n\x07MAINNET\x10\x01\
    \x12\n\n\x06DEVNET\x10\x02\x12\x0b\n\x07TESTNET\x10\x03B\x02P\x01J\xcd\t\
    \n\x06\x12\x04\x13\0\x1e\x01\n\xdf\x06\n\x01\x0c\x12\x03\x13\0\x122\xd4\
    \x06*\n\x20Copyright\x20(c)\x202019\x20Catalyst\x20Network\n\n\x20This\
    \x20file\x20is\x20part\x20of\x20Catalyst.Network.Protocol.Protobuffs\x20\
    <https://github.com/catalyst-network/protocol-protobuffs>\n\n\x20Catalys\
    t.Network.Protocol.Protobuffs\x20is\x20free\x20software:\x20you\x20can\
    \x20redistribute\x20it\x20and/or\x20modify\n\x20it\x20under\x20the\x20te\
    rms\x20of\x20the\x20GNU\x20General\x20Public\x20License\x20as\x20publish\
    ed\x20by\n\x20the\x20Free\x20Software\x20Foundation,\x20either\x20versio\
    n\x202\x20of\x20the\x20License,\x20or\n\x20(at\x20your\x20option)\x20any\
    \x20later\x20version.\n\x20\n\x20Catalyst.Network.Protocol.Protobuffs\
    \x20is\x20distributed\x20in\x20the\x20hope\x20that\x20it\x20will\x20be\
    \x20useful,\n\x20but\x20WITHOUT\x20ANY\x20WARRANTY;\x20without\x20even\
    \x20the\x20implied\x20warranty\x20of\n\x20MERCHANTABILITY\x20or\x20FITNE\
    SS\x20FOR\x20A\x20PARTICULAR\x20PURPOSE.\x20See\x20the\n\x20GNU\x20Gener\
    al\x20Public\x20License\x20for\x20more\x20details.\n\x20\n\x20You\x20sho\
    uld\x20have\x20received\x20a\x20copy\x20of\x20the\x20GNU\x20General\x20P\
    ublic\x20License\n\x20along\x20with\x20Catalyst.Network.Protocol.Protobu\
    ffs\x20If\x20not,\x20see\x20<https://www.gnu.org/licenses/>.\n\n\x08\n\
    \x01\x08\x12\x03\x15\0\"\n\x0b\n\x04\x08\xe7\x07\0\x12\x03\x15\0\"\n\x0c\
    \n\x05\x08\xe7\x07\0\x02\x12\x03\x15\x07\x1a\n\r\n\x06\x08\xe7\x07\0\x02\
    \0\x12\x03\x15\x07\x1a\n\x0e\n\x07\x08\xe7\x07\0\x02\0\x01\x12\x03\x15\
    \x07\x1a\n\x0c\n\x05\x08\xe7\x07\0\x03\x12\x03\x15\x1d!\n\x08\n\x01\x02\
    \x12\x03\x17\x08!\n\n\n\x02\x05\0\x12\x04\x19\0\x1e\x01\n\n\n\x03\x05\0\
    \x01\x12\x03\x19\x05\x10\n\x1f\n\x04\x05\0\x02\0\x12\x03\x1a\x04\x1d\"\
    \x12\x20un-known\x20network\n\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x1a\
    \x04\x18\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x1a\x1b\x1c\n\x20\n\x04\x05\
    \0\x02\x01\x12\x03\x1b\x04\x10\"\x13\x20main\x20live\x20network\n\n\x0c\
    \n\x05\x05\0\x02\x01\x01\x12\x03\x1b\x04\x0b\n\x0c\n\x05\x05\0\x02\x01\
    \x02\x12\x03\x1b\x0e\x0f\n\x1b\n\x04\x05\0\x02\x02\x12\x03\x1c\x04\x0f\"\
    \x0e\x20local\x20devnet\n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x1c\x04\
    \n\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x1c\r\x0e\n\x1d\n\x04\x05\0\x02\
    \x03\x12\x03\x1d\x04\x10\"\x10\x20public\x20testnet\n\n\x0c\n\x05\x05\0\
    \x02\x03\x01\x12\x03\x1d\x04\x0b\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\
    \x1d\x0e\x0fb\x06proto3\
";

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()
        })
    }
}