pub trait ToSummary {
// Required method
fn to_summary_with_options(&self, opts: &SummaryOptions) -> String;
// Provided method
fn to_summary(&self) -> String { ... }
}Expand description
Generate AI-readable structured text summary
This trait provides a standardized way to convert graph structures into text format optimized for LLM comprehension.
§Output Format Guidelines
Implementations should follow these conventions:
- Section Headers: Use
=== Title ===for main sections - Subsections: Use
[Subsection]with indented content - Relationships: Use
--kind-->arrows (e.g.,a --assign--> b) - Node Types: Use
(type)suffix (e.g.,var1 (param)) - Locations: Use
@ file:linesuffix when relevant - Lists: Use consistent indentation (2 spaces)
Required Methods§
Sourcefn to_summary_with_options(&self, opts: &SummaryOptions) -> String
fn to_summary_with_options(&self, opts: &SummaryOptions) -> String
Generate a structured text summary with custom options
Provided Methods§
Sourcefn to_summary(&self) -> String
fn to_summary(&self) -> String
Generate a structured text summary with default options
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".