/// Represents the result of fetch content truncation #[derive(Debug)] pub struct TruncatedFetchOutput { pub content: String, } /// Truncates fetch content based on character limit pub fn truncate_fetch_content(content: &str, truncation_limit: usize) -> TruncatedFetchOutput { let original_length = content.len(); let is_truncated = original_length > truncation_limit; let truncated_content = if is_truncated { content.chars().take(truncation_limit).collect() } else { content.to_string() }; TruncatedFetchOutput { content: truncated_content } }