Struct prost_reflect::FieldDescriptor
source · [−]pub struct FieldDescriptor { /* private fields */ }
Expand description
A protobuf message definition.
Implementations
Gets a reference to the FileDescriptor
this field is defined in.
Gets a reference to the MessageDescriptor
this field is defined in.
Gets the full name of the message field, e.g. my.package.MyMessage.my_field
.
Gets the name used for JSON serialization.
This is usually the camel-cased form of the field name, unless another value is set in the proto file.
Whether this field is a list type.
Equivalent to checking that the cardinality is Repeated
and that
is_map
returns false
.
Whether this field is a map type.
Equivalent to checking that the cardinality is Repeated
and that
the field type is a message where is_map_entry
returns true
.
Whether this field is a list encoded using packed encoding.
The cardinality of this field.
Whether this field supports distinguishing between an unpopulated field and the default value.
For proto2 messages this returns true
for all non-repeated fields.
For proto3 this returns true
for message fields, and fields contained
in a oneof
.
Gets a OneofDescriptor
representing the oneof containing this field,
or None
if this field is not contained in a oneof.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for FieldDescriptor
impl Send for FieldDescriptor
impl Sync for FieldDescriptor
impl Unpin for FieldDescriptor
impl UnwindSafe for FieldDescriptor
Blanket Implementations
Mutably borrows from an owned value. Read more