pub struct MessageValue {
    pub msg_ref: MessageRef,
    pub fields: Vec<FieldValue>,
    pub garbage: Option<Bytes>,
}
Expand description

Message value.

Fields

msg_ref: MessageRef

Reference to the message type.

fields: Vec<FieldValue>

Mesage field values.

garbage: Option<Bytes>

Garbage data at the end of the message.

As opposed to an UnknownValue::Invalid, the garbage data did not have a valid field number and for that reason cannot be placed into the fields vector.

Implementations

Encodes a message value into protobuf wire format.

Will panic if the message defined by the MessageRef does not exist in this context. Such panic means the MessageRef came from a different context. The panic is not guaranteed, as a message with an equal MessageRef may exist in multiple contexts.

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.