Expand description
§Utility Functions
This module contains utility functions and platform-specific implementations used throughout the KiteConnect library. It provides cross-platform abstractions for HTTP requests, CSV parsing, and other common operations.
§Platform Support
The utilities in this module are designed to work across different platforms:
- Native: Full functionality with optimized implementations
- WASM: Browser-compatible implementations using Web APIs
§Key Features
- Cross-platform HTTP handling: Abstract interface for HTTP requests
- CSV parsing: Platform-specific CSV parsing (native:
csv
, WASM:csv-core
) - URL management: Centralized API endpoint configuration
- Error handling: Consistent error patterns across platforms
§Example
// CSV parsing is handled internally by the KiteConnect client
use kiteconnect_async_wasm::connect::KiteConnect;
let client = KiteConnect::new("api_key", "access_token");
// CSV parsing happens automatically when fetching instruments
let instruments = client.instruments(None).await?;
println!("Parsed {} instruments", instruments.as_array().unwrap().len());
Constants§
- URL
- Base URL for KiteConnect API in production
Traits§
- Request
Handler - Async trait for handling HTTP requests across different platforms