anychain-tron 0.1.2

A Rust library for Tron-focused cryptocurrency wallets, enabling seamless transactions on the Tron blockchain
Documentation
// This file is generated by rust-protobuf 3.2.0. Do not edit
// .proto file is parsed by protoc --rust-out=...
// @generated

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

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

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]

//! Generated file from `core/contract/common.proto`

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

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:protocol.ResourceCode)
pub enum ResourceCode {
    // @@protoc_insertion_point(enum_value:protocol.ResourceCode.BANDWIDTH)
    BANDWIDTH = 0,
    // @@protoc_insertion_point(enum_value:protocol.ResourceCode.ENERGY)
    ENERGY = 1,
    // @@protoc_insertion_point(enum_value:protocol.ResourceCode.TRON_POWER)
    TRON_POWER = 2,
}

impl ::protobuf::Enum for ResourceCode {
    const NAME: &'static str = "ResourceCode";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<ResourceCode> {
        match value {
            0 => ::std::option::Option::Some(ResourceCode::BANDWIDTH),
            1 => ::std::option::Option::Some(ResourceCode::ENERGY),
            2 => ::std::option::Option::Some(ResourceCode::TRON_POWER),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [ResourceCode] = &[
        ResourceCode::BANDWIDTH,
        ResourceCode::ENERGY,
        ResourceCode::TRON_POWER,
    ];
}

impl ::protobuf::EnumFull for ResourceCode {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("ResourceCode").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = *self as usize;
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for ResourceCode {
    fn default() -> Self {
        ResourceCode::BANDWIDTH
    }
}

impl ResourceCode {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<ResourceCode>("ResourceCode")
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x1acore/contract/common.proto\x12\x08protocol*9\n\x0cResourceCode\x12\
    \r\n\tBANDWIDTH\x10\0\x12\n\n\x06ENERGY\x10\x01\x12\x0e\n\nTRON_POWER\
    \x10\x02BE\n\x18org.tron.protos.contractZ)github.com/tronprotocol/grpc-g\
    ateway/coreJ\xf6\x02\n\x06\x12\x04\0\0\x0c\x01\n\x08\n\x01\x0c\x12\x03\0\
    \0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x11\n\x08\n\x01\x08\x12\x03\x04\01\
    \nH\n\x02\x08\x01\x12\x03\x04\01\"=Specify\x20the\x20name\x20of\x20the\
    \x20package\x20that\x20generated\x20the\x20Java\x20file\n\n\x08\n\x01\
    \x08\x12\x03\x06\0@\ng\n\x02\x08\x0b\x12\x03\x06\0@\x1a\\option\x20java_\
    outer_classname\x20=\x20\"common\";\x20//Specify\x20the\x20class\x20name\
    \x20of\x20the\x20generated\x20Java\x20file\n\n\n\n\x02\x05\0\x12\x04\x08\
    \0\x0c\x01\n\n\n\x03\x05\0\x01\x12\x03\x08\x05\x11\n\x0b\n\x04\x05\0\x02\
    \0\x12\x03\t\x02\x13\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\t\x02\x0b\n\x0c\
    \n\x05\x05\0\x02\0\x02\x12\x03\t\x0e\x12\n\x0b\n\x04\x05\0\x02\x01\x12\
    \x03\n\x02\x10\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\n\x02\x08\n\x0c\n\
    \x05\x05\0\x02\x01\x02\x12\x03\n\x0b\x0f\n\x0b\n\x04\x05\0\x02\x02\x12\
    \x03\x0b\x02\x14\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x0b\x02\x0c\n\x0c\
    \n\x05\x05\0\x02\x02\x02\x12\x03\x0b\x0f\x13b\x06proto3\
";

/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
    file_descriptor_proto_lazy.get(|| {
        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
    })
}

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(0);
            let mut messages = ::std::vec::Vec::with_capacity(0);
            let mut enums = ::std::vec::Vec::with_capacity(1);
            enums.push(ResourceCode::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}