pub trait ProtobufValue: Any + 'static {
    // Required method
    fn as_ref(&self) -> ReflectValueRef<'_>;

    // Provided methods
    fn as_any(&self) -> &dyn Any { ... }
    fn is_non_zero(&self) -> bool { ... }
    fn as_ref_copy(&self) -> ReflectValueRef<'static> { ... }
}
Expand description

Type implemented by all protobuf elementary types (ints, floats, bool, string, bytes, enums, messages).

Required Methods§

source

fn as_ref(&self) -> ReflectValueRef<'_>

As ref

Provided Methods§

source

fn as_any(&self) -> &dyn Any

Convert to Any

source

fn is_non_zero(&self) -> bool

Is value non-zero?

source

fn as_ref_copy(&self) -> ReflectValueRef<'static>

Return ProtobufValueRef if self is Copy.

Panics

if Self is not Copy.

Implementations on Foreign Types§

source§

impl ProtobufValue for bool

source§

impl ProtobufValue for i32

source§

impl ProtobufValue for f32

source§

impl ProtobufValue for f64

source§

impl ProtobufValue for u64

source§

impl ProtobufValue for Vec<u8>

source§

impl ProtobufValue for u32

source§

impl ProtobufValue for i64

source§

impl ProtobufValue for str

source§

impl ProtobufValue for String

Implementors§

source§

impl ProtobufValue for FieldDescriptorProto_Label

source§

impl ProtobufValue for FieldDescriptorProto_Type

source§

impl ProtobufValue for FieldOptions_CType

source§

impl ProtobufValue for FieldOptions_JSType

source§

impl ProtobufValue for FileOptions_OptimizeMode

source§

impl ProtobufValue for MethodOptions_IdempotencyLevel

source§

impl ProtobufValue for CodeGeneratorResponse_Feature

source§

impl ProtobufValue for Field_Cardinality

source§

impl ProtobufValue for Field_Kind

source§

impl ProtobufValue for NullValue

source§

impl ProtobufValue for Syntax

source§

impl ProtobufValue for DescriptorProto

source§

impl ProtobufValue for DescriptorProto_ExtensionRange

source§

impl ProtobufValue for DescriptorProto_ReservedRange

source§

impl ProtobufValue for EnumDescriptorProto

source§

impl ProtobufValue for EnumDescriptorProto_EnumReservedRange

source§

impl ProtobufValue for EnumOptions

source§

impl ProtobufValue for EnumValueDescriptorProto

source§

impl ProtobufValue for EnumValueOptions

source§

impl ProtobufValue for ExtensionRangeOptions

source§

impl ProtobufValue for FieldDescriptorProto

source§

impl ProtobufValue for FieldOptions

source§

impl ProtobufValue for FileDescriptorProto

source§

impl ProtobufValue for FileDescriptorSet

source§

impl ProtobufValue for FileOptions

source§

impl ProtobufValue for GeneratedCodeInfo

source§

impl ProtobufValue for GeneratedCodeInfo_Annotation

source§

impl ProtobufValue for MessageOptions

source§

impl ProtobufValue for MethodDescriptorProto

source§

impl ProtobufValue for MethodOptions

source§

impl ProtobufValue for OneofDescriptorProto

source§

impl ProtobufValue for OneofOptions

source§

impl ProtobufValue for ServiceDescriptorProto

source§

impl ProtobufValue for ServiceOptions

source§

impl ProtobufValue for SourceCodeInfo

source§

impl ProtobufValue for SourceCodeInfo_Location

source§

impl ProtobufValue for UninterpretedOption

source§

impl ProtobufValue for UninterpretedOption_NamePart

source§

impl ProtobufValue for CodeGeneratorRequest

source§

impl ProtobufValue for CodeGeneratorResponse

source§

impl ProtobufValue for CodeGeneratorResponse_File

source§

impl ProtobufValue for Version

source§

impl ProtobufValue for Any

source§

impl ProtobufValue for Api

source§

impl ProtobufValue for BoolValue

source§

impl ProtobufValue for BytesValue

source§

impl ProtobufValue for DoubleValue

source§

impl ProtobufValue for Duration

source§

impl ProtobufValue for Empty

source§

impl ProtobufValue for Enum

source§

impl ProtobufValue for EnumValue

source§

impl ProtobufValue for Field

source§

impl ProtobufValue for FieldMask

source§

impl ProtobufValue for FloatValue

source§

impl ProtobufValue for Int32Value

source§

impl ProtobufValue for Int64Value

source§

impl ProtobufValue for ListValue

source§

impl ProtobufValue for Method

source§

impl ProtobufValue for Mixin

source§

impl ProtobufValue for Option

source§

impl ProtobufValue for SourceContext

source§

impl ProtobufValue for StringValue

source§

impl ProtobufValue for Struct

source§

impl ProtobufValue for Timestamp

source§

impl ProtobufValue for Type

source§

impl ProtobufValue for UInt32Value

source§

impl ProtobufValue for UInt64Value

source§

impl ProtobufValue for Value