pub enum Value {
Show 20 variants Double(f64), Float(f32), Int32(i32), Int64(i64), UInt32(u32), UInt64(u64), SInt32(i32), SInt64(i64), Fixed32(u32), Fixed64(u64), SFixed32(i32), SFixed64(i64), Bool(bool), String(String), Bytes(Bytes), Packed(PackedArray), Message(Box<MessageValue>), Enum(EnumValue), Incomplete(u8Bytes), Unknown(UnknownValue),
}
Expand description

Decoded protocol buffer value.

Variants

Double(f64)

double value.

Float(f32)

float value.

Int32(i32)

int32 value.

Int64(i64)

int64 value.

UInt32(u32)

uint32 value.

UInt64(u64)

uint64 value.

SInt32(i32)

sint32 value.

SInt64(i64)

sint64 value.

Fixed32(u32)

fixed32 value.

Fixed64(u64)

fixed64 value.

SFixed32(i32)

sfixed32 value.

SFixed64(i64)

sfixed64 value.

Bool(bool)

bool value.

String(String)

string value.

Bytes(Bytes)

bytes value.

Packed(PackedArray)

A repeated packed value.

Message(Box<MessageValue>)

Message type value.

Enum(EnumValue)

Enum type value.

Incomplete(u8Bytes)

Value which was incomplete due to missing bytes in the payload.

Unknown(UnknownValue)

Value which wasn’t defined in the context.

The wire type allows the decoder to tell how large an unknown value is. This allows the unknown value to be skipped and decoding can continue from the next value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.