Create a pair with only a SEMANTIC section (no graph layer). This is unusual but can happen when enriching an existing change with semantic metadata (e.g., server-side AST enrichment).
(
path: String,
file_ops: FileOps,
content_start: u64,
content_end: u64,
)
| 599 | /// This is unusual but can happen when enriching an existing change |
| 600 | /// with semantic metadata (e.g., server-side AST enrichment). |
| 601 | pub fn semantic_only( |
| 602 | path: String, |
| 603 | file_ops: FileOps, |
| 604 | content_start: u64, |
| 605 | content_end: u64, |
| 606 | ) -> Self { |
| 607 | Self { |
| 608 | graph: None, |
| 609 | semantic: Some(SemanticSectionPayload::new( |
| 610 | path.clone(), |
| 611 | file_ops, |
| 612 | content_start, |
| 613 | content_end, |
| 614 | )), |
| 615 | path, |
| 616 | } |
| 617 | } |
| 618 | |
| 619 | /// Returns `true` if this pair has a GRAPH section. |
| 620 | #[inline] |