pub trait ProtoPrimitive: InputNode {
    fn proto_primitive_type() -> &'static str;
    fn proto_primitive_default() -> PrimitiveData;
    fn proto_primitive_data(&self) -> PrimitiveData;
    fn proto_primitive_is_default(&self) -> bool;
}
Expand description

Trait for Rust types that map to the protobuf primitive types.

Required Methods

Returns the protobuf type name for primitives of this type.

Returns the protobuf-specified default value for this primitive data type.

Returns the actual value for this primitive data type as a ProtoPrimitiveData variant.

Returns whether this is the default value of the primitive.

Implementations on Foreign Types

Implementors

Blanket implementation to make all protobuf enums behave like primitives as well.