pub enum Member {
Field(Field),
StaticAssert {
cond: ExprId,
message: Option<StrId>,
span: Span,
},
}Expand description
One entry in a struct or union member list.
A member list is a list of declarations, and since C23 a static assertion is allowed to be one of them. Keeping the assertion in the list rather than in a second list beside it is what preserves the order the members were written in, which the printer needs and which a diagnostic about the member after the assertion needs too.
Variants§
Field(Field)
A member declaration.
StaticAssert
static_assert(cond) or static_assert(cond, "message") among the members.
Trait Implementations§
impl Copy for Member
impl Eq for Member
impl StructuralPartialEq for Member
Auto Trait Implementations§
impl Freeze for Member
impl RefUnwindSafe for Member
impl Send for Member
impl Sync for Member
impl Unpin for Member
impl UnsafeUnpin for Member
impl UnwindSafe for Member
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