pub struct NameIndex { /* private fields */ }Expand description
A declaration’s names by their key under one Spelling: a record’s
fields, or an enum’s constructors and each constructor’s named payload
fields, each mapped to its position in declaration order.
Implementations§
Source§impl NameIndex
impl NameIndex
Sourcepub fn of(body: &Body, spelling: Spelling) -> Result<NameIndex, SharedKey>
pub fn of(body: &Body, spelling: Spelling) -> Result<NameIndex, SharedKey>
Indexes the names body declares by their key under spelling.
§Errors
The first two names of one scope that share a key, scopes taken in order: the record’s fields, or the enum’s constructors and then each constructor’s payload fields.
Trait Implementations§
Auto Trait Implementations§
impl Forget for NameIndex
impl Freeze for NameIndex
impl Move for NameIndex
impl RefUnwindSafe for NameIndex
impl Send for NameIndex
impl Sync for NameIndex
impl Unpin for NameIndex
impl UnsafeUnpin for NameIndexwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(Box<str>, usize)>: UnsafeUnpin,
PhantomData<HashMap<Box<str>, usize>>: UnsafeUnpin,
impl UnwindSafe for NameIndex
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