pub enum SymbolMutation {
Allocate {
id: SymbolId,
name: String,
kind: SymbolKind,
},
Rename {
id: SymbolId,
new_canonical: String,
kind: SymbolKind,
},
Alias {
id: SymbolId,
alias: String,
kind: SymbolKind,
},
Retire {
id: SymbolId,
name: String,
kind: SymbolKind,
},
}Expand description
One symbol-table mutation performed by the binder while processing a
batch. The emit stage serializes the journal into SYMBOL_*
canonical records (opcodes 0x30–0x33 per ir-canonical-form.md
§ 6.6) so that replay from the log can reconstitute the workspace’s
symbol table. Per librarian-pipeline.md § 3.4 the journal is part
of bind’s output alongside the bound AST.
Variants§
Allocate
A first-use allocation — id, name (canonical), kind.
Fields
§
kind: SymbolKindLocked kind.
Rename
Rename — old canonical becomes an alias; new canonical attaches
to the same id. Replay reconstructs the canonical/alias state.
Fields
§
kind: SymbolKindLocked kind at the time of the rename.
Alias
Alias — an additional name resolves to the same id.
Retire
Retire — sets the symbol’s retired flag.
Trait Implementations§
Source§impl Clone for SymbolMutation
impl Clone for SymbolMutation
Source§fn clone(&self) -> SymbolMutation
fn clone(&self) -> SymbolMutation
Returns a duplicate of the value. Read more
1.0.0 · 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 SymbolMutation
impl Debug for SymbolMutation
Source§impl PartialEq for SymbolMutation
impl PartialEq for SymbolMutation
impl Eq for SymbolMutation
impl StructuralPartialEq for SymbolMutation
Auto Trait Implementations§
impl Freeze for SymbolMutation
impl RefUnwindSafe for SymbolMutation
impl Send for SymbolMutation
impl Sync for SymbolMutation
impl Unpin for SymbolMutation
impl UnsafeUnpin for SymbolMutation
impl UnwindSafe for SymbolMutation
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.