Struct protobuf::ProtobufEnumOrUnknown [−][src]
#[repr(transparent)]pub struct ProtobufEnumOrUnknown<E> { /* fields omitted */ }Expand description
Protobuf enums with possibly unknown values are preserved in this struct.
Implementations
Construct from any i32 value.
Note passed value is not required to be a valid enum value.
Construct from typed enum
Get i32 value as typed enum. Return None is value is unknown.
Get i32 value as typed enum.
Return default enum value (first value) if value is unknown.
Get i32 value as typed enum.
Return given enum value if value is unknown.
Get enum descriptor by type.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
type RuntimeType = RuntimeTypeEnumOrUnknown<E>
type RuntimeType = RuntimeTypeEnumOrUnknown<E>
Actual implementation of type properties.
Dynamic version of the type.
Pointer to a dynamic reference.
Mutable pointer to a dynamic mutable reference.
Construct a value from given reflective value. Read more
Write the value.
Default value for this type.
Convert a value into a ref value if possible. Read more
Value is non-default?
Auto Trait Implementations
impl<E> RefUnwindSafe for ProtobufEnumOrUnknown<E> where
E: RefUnwindSafe,
impl<E> Send for ProtobufEnumOrUnknown<E> where
E: Send,
impl<E> Sync for ProtobufEnumOrUnknown<E> where
E: Sync,
impl<E> Unpin for ProtobufEnumOrUnknown<E> where
E: Unpin,
impl<E> UnwindSafe for ProtobufEnumOrUnknown<E> where
E: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more