pub struct CompositeCatalog { /* private fields */ }Expand description
组合目录 — 按优先级合并多个工具源。
遮蔽策略(Shadowing): 靠前的源优先级高,同名工具被遮蔽。
遮蔽发生时通过 tracing::warn! 记录结构化日志。
Implementations§
Source§impl CompositeCatalog
impl CompositeCatalog
Sourcepub fn builder() -> CompositeCatalogBuilder
pub fn builder() -> CompositeCatalogBuilder
创建组合目录(Builder 模式)。
Sourcepub fn new(sources: Vec<Arc<dyn ToolCatalog>>) -> Self
pub fn new(sources: Vec<Arc<dyn ToolCatalog>>) -> Self
创建组合目录(简单模式,默认 Shadow 策略)。
sources 按优先级从高到低排列。
Sourcepub fn conflicts(&self) -> Vec<CatalogConflict>
pub fn conflicts(&self) -> Vec<CatalogConflict>
获取所有冲突详情
Trait Implementations§
Source§impl ToolCatalog for CompositeCatalog
impl ToolCatalog for CompositeCatalog
Auto Trait Implementations§
impl !Freeze for CompositeCatalog
impl !RefUnwindSafe for CompositeCatalog
impl !UnwindSafe for CompositeCatalog
impl Send for CompositeCatalog
impl Sync for CompositeCatalog
impl Unpin for CompositeCatalog
impl UnsafeUnpin for CompositeCatalog
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