Struct protobuf::reflect::FieldDescriptor [−][src]
pub struct FieldDescriptor { /* fields omitted */ }
Expand description
Field descriptor.
Can be used for runtime reflection.
Implementations
Get .proto
description of field
Oneof descriptor containing this field.
If this field is optional or required.
If this field repeated or map?
Is this field repeated, but not map field?
Check if field is set in given message.
For repeated field or map field return true
if
collection is not empty.
Panics
If this field belongs to a different message type.
Get message field or default instance if field is unset.
Panics
If this field belongs to a different message type or field type is not message.
Get a mutable reference to a message field. Initialize field with default message if unset.
Panics
If this field belongs to a different message type or field type is not singular message.
Get singular field value.
Return field default value if field is unset.
Panics
If this field belongs to a different message type or fields is not singular.
Runtime representation of singular field.
Panics
If this field belongs to a different message type or field is not singular.
Set singular field.
Panics
If this field belongs to a different message type or field is not singular or value is of different type.
Dynamic representation of field type.
Get singular field value.
Return None
if field is unset.
Panics
If this field belongs to a different message type or fields is not singular.
Get repeated field.
Panics
If this field belongs to a different message type or field is not repeated.
Get a mutable reference to repeated
field.
Panics
If this field belongs to a different message type or field is not repeated
.
Get a mutable reference to map
field.
Panics
If this field belongs to a different message type or field is not map
.
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