Fast Context • Rust AI Agent SDK
FastContext: Fast context for efficient context management
FastContext
Defined in the specialized module.
Rust AI Agent SDK
Fast context for efficient context management
Fields
| Name | Type | Description |
|---|---|---|
entries | Vec<String> | Context entries |
max_size | usize | Maximum size in characters |
current_size | usize | Current size |
Methods
new
fn new(max_size: usize) -> SelfCreate a new fast context
Parameters:
| Name | Type |
|---|---|
max_size | usize |
add
fn add(&mut self, content: impl Into<String>) -> ()Add content to context
Parameters:
| Name | Type |
|---|---|
content | impl Into<String> |
get
fn get(&self) -> &[String]Get all context
as_string
fn as_string(&self) -> StringGet context as single string
clear
fn clear(&mut self) -> ()Clear context
size
fn size(&self) -> usizeGet current size
is_empty
fn is_empty(&self) -> boolCheck if empty
Source
View on GitHubpraisonai/src/parity/specialized.rs at line 279