> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Line Range • Rust AI Agent SDK

> LineRange: A line range within a file.

# LineRange

> Defined in the [**context**](../modules/context) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

A line range within a file.

## Fields

| Name              | Type                   | Description                     |
| ----------------- | ---------------------- | ------------------------------- |
| `start`           | `usize`                | Start line (1-indexed)          |
| `end`             | `usize`                | End line (1-indexed)            |
| `content`         | `Option&lt;String&gt;` | Content of the lines (optional) |
| `relevance_score` | `f32`                  | Relevance score (0.0 to 1.0)    |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(start: usize, end: usize) -> Self
```

Create a new line range.

**Parameters:**

| Name    | Type    |
| ------- | ------- |
| `start` | `usize` |
| `end`   | `usize` |

### `content`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn content(mut self, content: impl Into<String>) -> Self
```

Set content.

**Parameters:**

| Name      | Type                      |
| --------- | ------------------------- |
| `content` | `impl Into&lt;String&gt;` |

### `relevance_score`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn relevance_score(mut self, score: f32) -> Self
```

Set relevance score.

**Parameters:**

| Name    | Type  |
| ------- | ----- |
| `score` | `f32` |

### `line_count`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn line_count(&self) -> usize
```

Get line count.

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/context/mod.rs#L555">
  `praisonai/src/context/mod.rs` at line 555
</Card>
