pub struct DependencyManager { /* private fields */ }Expand description
依赖管理器
Implementations§
Source§impl DependencyManager
impl DependencyManager
pub fn new() -> Self
Sourcepub fn add_plugin(&mut self, plugin_name: &str)
pub fn add_plugin(&mut self, plugin_name: &str)
添加插件节点
Sourcepub fn check_missing_dependencies(&self) -> MissingDependencyReport
pub fn check_missing_dependencies(&self) -> MissingDependencyReport
检查缺失的依赖 - 直接从图中提取
Sourcepub fn has_circular_dependencies(&self) -> bool
pub fn has_circular_dependencies(&self) -> bool
检查循环依赖
Sourcepub fn get_circular_dependencies(&self) -> Vec<Vec<String>>
pub fn get_circular_dependencies(&self) -> Vec<Vec<String>>
获取循环依赖
Sourcepub fn get_topological_order(&self) -> Result<Vec<String>>
pub fn get_topological_order(&self) -> Result<Vec<String>>
获取拓扑排序
Sourcepub fn get_direct_dependencies(&self, plugin_name: &str) -> Vec<String>
pub fn get_direct_dependencies(&self, plugin_name: &str) -> Vec<String>
获取插件的直接依赖
Sourcepub fn get_all_dependencies(&self, plugin_name: &str) -> HashSet<String>
pub fn get_all_dependencies(&self, plugin_name: &str) -> HashSet<String>
获取插件的所有依赖(包括间接依赖)
Sourcepub fn get_circular_dependency_report(&self) -> CircularDependencyReport
pub fn get_circular_dependency_report(&self) -> CircularDependencyReport
获取循环依赖的详细报告
Trait Implementations§
Source§impl Debug for DependencyManager
impl Debug for DependencyManager
Auto Trait Implementations§
impl Freeze for DependencyManager
impl RefUnwindSafe for DependencyManager
impl Send for DependencyManager
impl Sync for DependencyManager
impl Unpin for DependencyManager
impl UnwindSafe for DependencyManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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