pub struct SymbolTable {
pub by_name: HashMap<String, SymbolInfo>,
}Expand description
Owned name → info map. BTreeMap would give deterministic
iteration order but we want O(1) lookup by symbol name in the
JumpTable construction step, so HashMap it is.
Fields§
§by_name: HashMap<String, SymbolInfo>Implementations§
Source§impl SymbolTable
impl SymbolTable
Sourcepub fn count_kind(&self, kind: SymbolKind) -> usize
pub fn count_kind(&self, kind: SymbolKind) -> usize
Number of symbols of the given kind. Mostly a test convenience.
Trait Implementations§
Source§impl Clone for SymbolTable
impl Clone for SymbolTable
Source§fn clone(&self) -> SymbolTable
fn clone(&self) -> SymbolTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SymbolTable
impl Debug for SymbolTable
Source§impl Default for SymbolTable
impl Default for SymbolTable
Source§fn default() -> SymbolTable
fn default() -> SymbolTable
Returns the “default value” for a type. Read more
impl Eq for SymbolTable
Source§impl PartialEq for SymbolTable
impl PartialEq for SymbolTable
Source§fn eq(&self, other: &SymbolTable) -> bool
fn eq(&self, other: &SymbolTable) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SymbolTable
Auto Trait Implementations§
impl Freeze for SymbolTable
impl RefUnwindSafe for SymbolTable
impl Send for SymbolTable
impl Sync for SymbolTable
impl Unpin for SymbolTable
impl UnsafeUnpin for SymbolTable
impl UnwindSafe for SymbolTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.