Skip to main content

GraphExtractable

Trait GraphExtractable 

Source
pub trait GraphExtractable: Send + Sync {
    // Required methods
    fn data_point_id(&self) -> Uuid;
    fn data_point_type(&self) -> &str;
    fn relationships(&self) -> Vec<Relationship>;
}
Expand description

Declares how a DataPoint type participates in the knowledge graph.

Each concrete DataPoint struct (DocumentChunk, Entity, TextSummary, etc.) implements this trait to declare its outgoing structural relationships.

belongs_to_set is intentionally excluded — it is a metadata property, not a graph edge.

Required Methods§

Source

fn data_point_id(&self) -> Uuid

The DataPoint ID of this instance.

Source

fn data_point_type(&self) -> &str

The DataPoint type name (e.g., “DocumentChunk”, “Entity”).

Source

fn relationships(&self) -> Vec<Relationship>

Outgoing structural relationships from this instance.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§