Skip to main content

ToSummary

Trait ToSummary 

Source
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:

  1. Section Headers: Use === Title === for main sections
  2. Subsections: Use [Subsection] with indented content
  3. Relationships: Use --kind--> arrows (e.g., a --assign--> b)
  4. Node Types: Use (type) suffix (e.g., var1 (param))
  5. Locations: Use @ file:line suffix when relevant
  6. Lists: Use consistent indentation (2 spaces)

Required Methods§

Source

fn to_summary_with_options(&self, opts: &SummaryOptions) -> String

Generate a structured text summary with custom options

Provided Methods§

Source

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".

Implementors§