pub struct MessageDescriptor { /* private fields */ }
Expand description

Dynamic representation of message type.

Used for reflection.

Implementations

Get underlying DescriptorProto object.

Message name as specified in .proto file.

Get a message descriptor for given message type

Messages declared in this messages.

Get enums declared in this message.

Get a message containing this message, or None if this message is declared at file level.

FileDescriptor containing this message.

FileDescriptorProto containg this message type

source

pub fn is_map_entry(&self) -> bool

This message descriptor is a map entry.

New empty message.

Panics

If this message is a map entry message.

Shared immutable empty message.

Returns None for dynamic message.

Panics

If this message is a map entry message.

Check if two messages equal.

Panics

Is any message has different type than this descriptor.

Fully qualified protobuf message name

Name relative to the package where the message is declared.

Nested oneofs including synthetic.

Non-synthetic oneofs.

Get message oneof by name (not implemented).

Message field descriptors.

Extension fields.

Find message field by protobuf field name

Note: protobuf field name might be different for Rust field name.

Find message field by field name or field JSON name

Find message field by field name

Parse message from stream.

Parse message from reader. Parse stops on EOF or when error encountered.

Parse message from byte array.

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
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. 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.