pub struct Field {
pub name: String,
pub number: i32,
pub label: Label,
pub ty: Option<ProtoFieldType>,
pub type_name: String,
pub oneof_index: Option<i32>,
}Expand description
One field of a message (FieldDescriptorProto).
Fields§
§name: StringField name.
number: i32Field number -> XTypes member id.
label: LabelCardinality.
ty: Option<ProtoFieldType>Field type; None if the descriptor carried an out-of-range type code.
type_name: StringFor message/enum/group fields: the fully-qualified type name (leading
.), else empty.
oneof_index: Option<i32>FieldDescriptorProto.oneof_index — the index into the message’s
oneof_decl list if this field is part of a oneof, else None.
Trait Implementations§
impl Eq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more