pub struct SharedFindings<L: Language> { /* private fields */ }Expand description
Concurrent shared state between TD and BU pipelines.
Generic over L: Language so that BehavioralBreak<L> carries
typed category data instead of stringly-typed labels.
Thread-safe: all fields use concurrent data structures.
Wrapped in Arc for sharing between async tasks.
Implementations§
Sourcepub fn insert_structural_break(&self, change: StructuralChange)
pub fn insert_structural_break(&self, change: StructuralChange)
Insert a structural break found by TD.
Also broadcasts the qualified name to BU via the channel. If the broadcast fails (no receivers yet), that’s fine — BU will check the DashMap directly.
Sourcepub fn insert_structural_breaks(&self, changes: Vec<StructuralChange>)
pub fn insert_structural_breaks(&self, changes: Vec<StructuralChange>)
Insert multiple structural breaks (batch operation after diff_surfaces).
Sourcepub fn set_old_surface(&self, surface: Arc<ApiSurface<L::SymbolData>>)
pub fn set_old_surface(&self, surface: Arc<ApiSurface<L::SymbolData>>)
Set the old API surface (called by TD after extraction).
Accepts an Arc so the caller can retain a cheap handle.
Sourcepub fn set_new_surface(&self, surface: Arc<ApiSurface<L::SymbolData>>)
pub fn set_new_surface(&self, surface: Arc<ApiSurface<L::SymbolData>>)
Set the new API surface (called by TD after extraction).
Sourcepub fn subscribe_to_td(&self) -> BuReceiver
pub fn subscribe_to_td(&self) -> BuReceiver
Subscribe to TD’s broadcast channel.
Call this once at the start of BU. Returns a BuReceiver that
wraps the broadcast receiver and a local skip set for efficient
repeated checks.
Sourcepub fn has_structural_break(&self, qualified_name: &str) -> bool
pub fn has_structural_break(&self, qualified_name: &str) -> bool
Check if TD already found a structural break for this symbol.
This is the DashMap fallback — always accurate but doesn’t benefit from the broadcast channel’s real-time notifications.
Sourcepub fn insert_behavioral_break(&self, brk: BehavioralBreak<L>)
pub fn insert_behavioral_break(&self, brk: BehavioralBreak<L>)
Insert a behavioral break found by BU.
Sourcepub fn structural_breaks(&self) -> &DashMap<String, StructuralChange>
pub fn structural_breaks(&self) -> &DashMap<String, StructuralChange>
Get all structural breaks (for merge step).
Sourcepub fn behavioral_breaks(&self) -> &DashMap<String, BehavioralBreak<L>>
pub fn behavioral_breaks(&self) -> &DashMap<String, BehavioralBreak<L>>
Get all behavioral breaks (for merge step).
Sourcepub async fn get_old_surface(&self) -> &Arc<ApiSurface<L::SymbolData>>
pub async fn get_old_surface(&self) -> &Arc<ApiSurface<L::SymbolData>>
Get the old API surface (blocks if TD hasn’t set it yet).
Sourcepub async fn get_new_surface(&self) -> &Arc<ApiSurface<L::SymbolData>>
pub async fn get_new_surface(&self) -> &Arc<ApiSurface<L::SymbolData>>
Get the new API surface (blocks if TD hasn’t set it yet).
Sourcepub fn try_get_old_surface(&self) -> Option<&Arc<ApiSurface<L::SymbolData>>>
pub fn try_get_old_surface(&self) -> Option<&Arc<ApiSurface<L::SymbolData>>>
Try to get the old surface without blocking (returns None if not set yet).
Returns a reference to the Arc — clone the Arc (cheap) if you need
ownership, or borrow through it with &**arc.
Sourcepub fn try_get_new_surface(&self) -> Option<&Arc<ApiSurface<L::SymbolData>>>
pub fn try_get_new_surface(&self) -> Option<&Arc<ApiSurface<L::SymbolData>>>
Try to get the new surface without blocking (returns None if not set yet).
Sourcepub fn degradation(&self) -> &DegradationTracker
pub fn degradation(&self) -> &DegradationTracker
Access the degradation tracker to record or query non-fatal issues.
Available to all pipeline phases and Language implementations.
Sourcepub fn degradation_arc(&self) -> Arc<DegradationTracker>
pub fn degradation_arc(&self) -> Arc<DegradationTracker>
Get a clone of the Arc-wrapped degradation tracker.
Useful when you need to pass the tracker to a spawned task.
Sourcepub fn structural_break_count(&self) -> usize
pub fn structural_break_count(&self) -> usize
Count of structural breaks found so far.
Sourcepub fn behavioral_break_count(&self) -> usize
pub fn behavioral_break_count(&self) -> usize
Count of behavioral breaks found so far.
Sourcepub fn structural_break_names(&self) -> Vec<String>
pub fn structural_break_names(&self) -> Vec<String>
Get all structural break qualified names (for reconciliation).