pub struct RecordSpecId(pub u32);Expand description
Identifies one struct/union specifier in TranslationUnit::records.
A declarator is resolved into a Type as it is parsed, so the specifier
of struct S { … } a, b; is named by the type of every declarator that
shares it and by the declaration’s own specifiers. Storing the member
list once and handing out an index keeps that from copying the body — which,
for a record nested inside a record, would double the data at every level.
An index rather than an Rc because the tree crosses the thread boundary
crate::analyze puts the deep passes behind, and has to stay Send.
Tuple Fields§
§0: u32Implementations§
Source§impl RecordSpecId
impl RecordSpecId
Sourcepub fn index(self) -> usize
pub fn index(self) -> usize
The index into TranslationUnit::records.
Trait Implementations§
Source§impl Clone for RecordSpecId
impl Clone for RecordSpecId
impl Copy for RecordSpecId
Source§impl Debug for RecordSpecId
impl Debug for RecordSpecId
impl Eq for RecordSpecId
Source§impl Hash for RecordSpecId
impl Hash for RecordSpecId
Source§impl Ord for RecordSpecId
impl Ord for RecordSpecId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RecordSpecId
impl PartialEq for RecordSpecId
Source§impl PartialOrd for RecordSpecId
impl PartialOrd for RecordSpecId
impl StructuralPartialEq for RecordSpecId
Auto Trait Implementations§
impl Freeze for RecordSpecId
impl RefUnwindSafe for RecordSpecId
impl Send for RecordSpecId
impl Sync for RecordSpecId
impl Unpin for RecordSpecId
impl UnsafeUnpin for RecordSpecId
impl UnwindSafe for RecordSpecId
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