Line Range • Rust AI Agent SDK
LineRange: A line range within a file.
LineRange
Defined in the context module.
Rust AI Agent SDK
A line range within a file.
Fields
| Name | Type | Description |
|---|---|---|
start | usize | Start line (1-indexed) |
end | usize | End line (1-indexed) |
content | Option<String> | Content of the lines (optional) |
relevance_score | f32 | Relevance score (0.0 to 1.0) |
Methods
new
fn new(start: usize, end: usize) -> SelfCreate a new line range.
Parameters:
| Name | Type |
|---|---|
start | usize |
end | usize |
content
fn content(mut self, content: impl Into<String>) -> SelfSet content.
Parameters:
| Name | Type |
|---|---|
content | impl Into<String> |
relevance_score
fn relevance_score(mut self, score: f32) -> SelfSet relevance score.
Parameters:
| Name | Type |
|---|---|
score | f32 |
line_count
fn line_count(&self) -> usizeGet line count.
Source
View on GitHubpraisonai/src/context/mod.rs at line 555