#[non_exhaustive]pub enum SymbolKey {
U64(u64),
Str(Arc<str>),
Fresh(u64),
}Expand description
The identity of a symbol within a context.
Keys are opaque to bitwright. A key has exactly one width per context. The derived order (integers, then strings, then fresh keys) is part of the canonical operand order, so it is the same in every context.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
U64(u64)
An integer key chosen by the caller (for example a register or variable number).
Str(Arc<str>)
A name.
Fresh(u64)
A key from Context::fresh_symbol.
Trait Implementations§
impl Eq for SymbolKey
Source§impl Ord for SymbolKey
impl Ord for SymbolKey
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 PartialOrd for SymbolKey
impl PartialOrd for SymbolKey
impl StructuralPartialEq for SymbolKey
Auto Trait Implementations§
impl Freeze for SymbolKey
impl RefUnwindSafe for SymbolKey
impl Send for SymbolKey
impl Sync for SymbolKey
impl Unpin for SymbolKey
impl UnsafeUnpin for SymbolKey
impl UnwindSafe for SymbolKey
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