pub struct EnumDef {
pub unsigned: bool,
pub tag: Option<String>,
pub rust_name: String,
pub anonymous: bool,
pub emit: bool,
pub range: SourceRange,
}Expand description
A file-scope enum tag, which becomes a named c_int alias.
Fields§
§unsigned: boolWhether the enumeration’s underlying type is unsigned, which is what GCC and Clang pick when no enumerator is negative.
The choice is implementation defined and only observable through a
bit-field of the type, which is where this is used; everywhere else an
enumeration is int, as Ty::Enum says.
tag: Option<String>The C tag, if one was written.
rust_name: StringThe name of the generated Rust type alias.
anonymous: boolWhether rust_name is still synthetic and may be replaced by a
typedef name.
emit: boolWhether an alias item should be generated.
range: SourceRangeWhere the tag was defined.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnumDef
impl RefUnwindSafe for EnumDef
impl Send for EnumDef
impl Sync for EnumDef
impl Unpin for EnumDef
impl UnsafeUnpin for EnumDef
impl UnwindSafe for EnumDef
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