pub enum RegistryUpdate {
Add {
path: SymbolPath,
kind: SymbolKind,
span: FileSpan,
},
Remove {
id: SymbolId,
},
Rename {
id: SymbolId,
new_path: SymbolPath,
},
UpdateSpan {
id: SymbolId,
new_span: FileSpan,
},
UpdateVisibility {
id: SymbolId,
new_visibility: Visibility,
},
UpdateKind {
id: SymbolId,
new_kind: SymbolKind,
},
}Expand description
Registry change request (delta).
Represents a single atomic change to the SymbolRegistry. Collected during Mutation execution and applied at Tick end.
NOTE: Deserialize is NOT derived because FileSpan contains WorkspaceFilePath which requires context during deserialization.
Variants§
Add
Add a new symbol.
Fields
path: SymbolPathCanonical SymbolPath of the new symbol.
kind: SymbolKindKind classification (struct / fn / trait / …).
Remove
Remove an existing symbol.
Rename
Rename a symbol (change its path).
Fields
new_path: SymbolPathNew canonical SymbolPath to assign.
UpdateSpan
Update symbol’s file span (position changed).
Fields
UpdateVisibility
Update symbol’s visibility.
Fields
new_visibility: VisibilityReplacement visibility value.
UpdateKind
Update symbol’s kind.
Fields
new_kind: SymbolKindReplacement kind classification.
Implementations§
Source§impl RegistryUpdate
impl RegistryUpdate
Sourcepub fn target_id(&self) -> Option<SymbolId>
pub fn target_id(&self) -> Option<SymbolId>
Get the target SymbolId if this update modifies an existing symbol.
Returns None for Add operations (no existing symbol).
Sourcepub fn is_destructive(&self) -> bool
pub fn is_destructive(&self) -> bool
Check if this update is a destructive operation.
Destructive operations (Remove, Rename) require special handling for conflict detection.
Source§impl RegistryUpdate
impl RegistryUpdate
Sourcepub fn apply(self, registry: &mut SymbolRegistry) -> Result<(), ApplyError>
pub fn apply(self, registry: &mut SymbolRegistry) -> Result<(), ApplyError>
Apply this update to the registry.
Trait Implementations§
Source§impl Clone for RegistryUpdate
impl Clone for RegistryUpdate
Source§fn clone(&self) -> RegistryUpdate
fn clone(&self) -> RegistryUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RegistryUpdate
impl Debug for RegistryUpdate
Source§impl PartialEq for RegistryUpdate
impl PartialEq for RegistryUpdate
Source§fn eq(&self, other: &RegistryUpdate) -> bool
fn eq(&self, other: &RegistryUpdate) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RegistryUpdate
impl Serialize for RegistryUpdate
impl Eq for RegistryUpdate
impl StructuralPartialEq for RegistryUpdate
Auto Trait Implementations§
impl Freeze for RegistryUpdate
impl RefUnwindSafe for RegistryUpdate
impl Send for RegistryUpdate
impl Sync for RegistryUpdate
impl Unpin for RegistryUpdate
impl UnsafeUnpin for RegistryUpdate
impl UnwindSafe for RegistryUpdate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more