pub struct EnumInfo {
pub name: Option<String>,
pub location: SourceLocation,
pub values: Vec<EnumValue>,
pub body_location: SourceLocation,
pub attributes: Vec<String>,
pub doc: Option<TypeDoc>,
}Fields§
§name: Option<String>§location: SourceLocation§values: Vec<EnumValue>§body_location: SourceLocationLocation of the enum body for inserting fixes
attributes: Vec<String>Attributes between closing brace and type name (e.g., G_GNUC_FLAG_ENUM)
doc: Option<TypeDoc>Implementations§
Source§impl EnumInfo
impl EnumInfo
pub fn is_property_enum(&self) -> bool
pub fn is_signal_enum(&self) -> bool
Sourcepub fn is_flags_enum(&self) -> bool
pub fn is_flags_enum(&self) -> bool
Check if this appears to be a flags enum (bit flags pattern) based on bit shift operations or power-of-two values.
Sourcepub fn has_attribute(&self, attr_name: &str) -> bool
pub fn has_attribute(&self, attr_name: &str) -> bool
Check if this enum has a specific attribute (e.g., G_GNUC_FLAG_ENUM)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnumInfo
impl RefUnwindSafe for EnumInfo
impl Send for EnumInfo
impl Sync for EnumInfo
impl Unpin for EnumInfo
impl UnsafeUnpin for EnumInfo
impl UnwindSafe for EnumInfo
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