pub struct GraphBuilder { /* private fields */ }Expand description
Builder for creating dependency graphs from service collections.
Analyzes the registered services and their dependencies to build a complete graph representation suitable for export and visualization.
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
Sourcepub fn with_options(self, options: ExportOptions) -> Self
pub fn with_options(self, options: ExportOptions) -> Self
Sets export options for the graph builder.
Sourcepub fn with_exporter(self, exporter: Box<dyn GraphExporter>) -> Self
pub fn with_exporter(self, exporter: Box<dyn GraphExporter>) -> Self
Sets a custom graph exporter.
Sourcepub fn build_graph(
&self,
provider: &ServiceProvider,
) -> DiResult<DependencyGraph>
pub fn build_graph( &self, provider: &ServiceProvider, ) -> DiResult<DependencyGraph>
Builds a dependency graph from the service collection.
This method analyzes all registered services to extract their dependencies and relationships, creating a complete graph structure.
Sourcepub fn export(
&self,
graph: &DependencyGraph,
format: ExportFormat,
) -> DiResult<String>
pub fn export( &self, graph: &DependencyGraph, format: ExportFormat, ) -> DiResult<String>
Exports the dependency graph in the specified format.
Sourcepub fn build_and_export(
&self,
provider: &ServiceProvider,
format: ExportFormat,
) -> DiResult<String>
pub fn build_and_export( &self, provider: &ServiceProvider, format: ExportFormat, ) -> DiResult<String>
Builds and exports a dependency graph in one operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl !RefUnwindSafe for GraphBuilder
impl !Send for GraphBuilder
impl !Sync for GraphBuilder
impl Unpin for GraphBuilder
impl !UnwindSafe for GraphBuilder
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