Struct serde_protobuf::descriptor::FieldDescriptor [−][src]
pub struct FieldDescriptor { /* fields omitted */ }
Expand description
A descriptor for a single protocol buffer message field.
Implementations
impl FieldDescriptor
[src]
impl FieldDescriptor
[src]pub fn new<S>(
name: S,
number: i32,
field_label: FieldLabel,
field_type: InternalFieldType,
default_value: Option<Value>
) -> FieldDescriptor where
S: Into<String>,
[src]
pub fn new<S>(
name: S,
number: i32,
field_label: FieldLabel,
field_type: InternalFieldType,
default_value: Option<Value>
) -> FieldDescriptor where
S: Into<String>,
[src]Creates a new field descriptor.
pub fn from_proto(proto: &FieldDescriptorProto) -> FieldDescriptor
[src]
pub fn from_proto(proto: &FieldDescriptorProto) -> FieldDescriptor
[src]Reads a field descriptor from a parsed Protobuf descriptor.
pub fn field_label(&self) -> FieldLabel
[src]
pub fn field_label(&self) -> FieldLabel
[src]The label of the field.
pub fn is_repeated(&self) -> bool
[src]
pub fn is_repeated(&self) -> bool
[src]Whether the field is repeated.
pub fn field_type<'a>(&'a self, descriptors: &'a Descriptors) -> FieldType<'a>
[src]
pub fn field_type<'a>(&'a self, descriptors: &'a Descriptors) -> FieldType<'a>
[src]The type of the field.
pub fn default_value(&self) -> Option<&Value>
[src]
pub fn default_value(&self) -> Option<&Value>
[src]The default value of the field.