pub struct EnumValue {
pub name: String,
pub value: Option<i64>,
pub value_expr: Option<Expression>,
pub location: SourceLocation,
pub name_location: SourceLocation,
pub value_location: Option<SourceLocation>,
pub export_macros: Vec<ExportMacro>,
pub doc: Option<EnumValueDoc>,
}Fields§
§name: String§value: Option<i64>§value_expr: Option<Expression>The expression AST for the value (if present)
location: SourceLocationLocation of this enumerator node
name_location: SourceLocationLocation of just the name
value_location: Option<SourceLocation>Location of the value (if present)
export_macros: Vec<ExportMacro>§doc: Option<EnumValueDoc>Implementations§
Source§impl EnumValue
impl EnumValue
Sourcepub fn is_prop_last(&self) -> bool
pub fn is_prop_last(&self) -> bool
Check if this is a property count sentinel (N_PROPS, PROP_LAST, NUM_PROPERTIES, etc.)
Sourcepub fn is_signal_last(&self) -> bool
pub fn is_signal_last(&self) -> bool
Check if this is a signal count sentinel (N_SIGNALS, LAST_SIGNAL, NUM_SIGNALS, etc.)
Sourcepub fn value_text(&self) -> Option<&str>
pub fn value_text(&self) -> Option<&str>
Extract the value text from source (e.g., for N_PROPS = PROP_ORIENTATION, returns “PROP_ORIENTATION”)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnumValue
impl RefUnwindSafe for EnumValue
impl Send for EnumValue
impl Sync for EnumValue
impl Unpin for EnumValue
impl UnsafeUnpin for EnumValue
impl UnwindSafe for EnumValue
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