Struct protobuf::reflect::FieldDescriptor
source · [−]pub struct FieldDescriptor { /* private fields */ }
Expand description
Field descriptor.
Can be used for runtime reflection.
Implementations
Get .proto
description of field
If this field repeated?
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.
Return length of repeated field.
For singular field return 1
if field is set and 0
otherwise.
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 enum
field.
Panics
If this field belongs to a different message type
or field type is not singular enum
.
Get string
field.
Panics
If this field belongs to a different message type
or field type is not singular string
.
Get bytes
field.
Panics
If this field belongs to a different message type
or field type is not singular bytes
.
Get u32
field.
Panics
If this field belongs to a different message type
or field type is not singular u32
.
Get u64
field.
Panics
If this field belongs to a different message type
or field type is not singular u64
.
Get i32
field.
Panics
If this field belongs to a different message type
or field type is not singular i32
.
Get i64
field.
Panics
If this field belongs to a different message type
or field type is not singular i64
.
Get bool
field.
Panics
If this field belongs to a different message type or
field type is not singular bool
.
Get float
field.
Panics
If this field belongs to a different message type or
field type is not singular float
.
Get double
field.
Panics
If this field belongs to a different message type
or field type is not singular double
.