Trait protobuf::ProtobufEnum[][src]

pub trait ProtobufEnum: Eq + Sized + Copy + 'static {
    fn value(&self) -> i32;
fn from_i32(v: i32) -> Option<Self>; fn values() -> &'static [Self]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn descriptor(&self) -> &'static EnumValueDescriptor { ... }
fn enum_descriptor(&self) -> &'static EnumDescriptor { ... }
fn enum_descriptor_static() -> &'static EnumDescriptor { ... } }

Trait implemented by all protobuf enum types.

Required methods

fn value(&self) -> i32[src]

Get enum i32 value.

fn from_i32(v: i32) -> Option<Self>[src]

Try to create an enum from i32 value. Return None if value is unknown.

Loading content...

Provided methods

fn values() -> &'static [Self]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Get all enum values for enum type.

fn descriptor(&self) -> &'static EnumValueDescriptor[src]

Get enum value descriptor.

fn enum_descriptor(&self) -> &'static EnumDescriptor[src]

Get enum descriptor.

fn enum_descriptor_static() -> &'static EnumDescriptor[src]

Get enum descriptor by type.

Loading content...

Implementors

impl ProtobufEnum for FieldDescriptorProto_Label[src]

impl ProtobufEnum for FieldDescriptorProto_Type[src]

impl ProtobufEnum for FieldOptions_CType[src]

impl ProtobufEnum for FieldOptions_JSType[src]

impl ProtobufEnum for FileOptions_OptimizeMode[src]

impl ProtobufEnum for Field_Cardinality[src]

impl ProtobufEnum for Field_Kind[src]

impl ProtobufEnum for NullValue[src]

impl ProtobufEnum for Syntax[src]

Loading content...