pub struct FieldInfo {
pub name: String,
pub proto_type: i32,
pub label: i32,
pub is_packed: bool,
pub nested_type_name: Option<String>,
pub enum_type_name: Option<String>,
pub type_display_name: Option<String>,
pub enum_values: Box<[(i32, Box<str>)]>,
}Expand description
Per-field information extracted from a FieldDescriptorProto.
Fields§
§name: StringField name (for annotations).
proto_type: i32Proto type constant (matches Python’s FieldDescriptor.TYPE_* values).
label: i32Label constant (LABEL_OPTIONAL = 1, LABEL_REQUIRED = 2, LABEL_REPEATED = 3).
is_packed: booltrue for repeated scalar fields encoded as packed (proto2 [packed=true]
or proto3 implicit packing).
nested_type_name: Option<String>Fully-qualified type name for MESSAGE / GROUP fields (e.g. “.pkg.Inner”).
enum_type_name: Option<String>Enum type name for ENUM fields (for annotations).
type_display_name: Option<String>Enum/message name (short) for annotations.
enum_values: Box<[(i32, Box<str>)]>Numeric value → symbolic name table for ENUM fields. Sorted by numeric value for O(log n) lookup via binary_search_by_key. Empty for non-ENUM fields.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldInfo
impl RefUnwindSafe for FieldInfo
impl Send for FieldInfo
impl Sync for FieldInfo
impl Unpin for FieldInfo
impl UnsafeUnpin for FieldInfo
impl UnwindSafe for FieldInfo
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