pub struct StructField {
pub field_type: TypeInfo,
pub field_name: Option<String>,
pub location: SourceLocation,
pub bit_width: Option<u32>,
pub inner_fields: Vec<Self>,
}Expand description
A parsed field from a struct body (e.g. GObject parent → field_type =
“GObject”)
Fields§
§field_type: TypeInfo§field_name: Option<String>Field name, if present (anonymous bitfields have none)
location: SourceLocation§bit_width: Option<u32>Bit-width for bitfield members (unsigned flags : 1 → Some(1)).
inner_fields: Vec<Self>Non-empty for anonymous struct/union fields: the members of the
embedded aggregate (e.g. union { A a; B b; } d → inner_fields = [a,
b]).
Implementations§
Source§impl StructField
impl StructField
Sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
True for future-use padding fields that should never be flagged as dead
code: names starting with rfu, reserved, padding, or _padding.
Trait Implementations§
Source§impl Clone for StructField
impl Clone for StructField
Source§impl Debug for StructField
impl Debug for StructField
Auto Trait Implementations§
impl Freeze for StructField
impl RefUnwindSafe for StructField
impl Send for StructField
impl Sync for StructField
impl Unpin for StructField
impl UnsafeUnpin for StructField
impl UnwindSafe for StructField
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