TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/hypertekorg/hyperstack/llms.txt
Use this file to discover all available pages before exploring further.
HyperStack client is the main entry point for connecting to HyperStack streaming servers in Rust.
Basic Connection
Connect to a stack’s default URL:Custom URL Connection
Connect to a specific server URL:HyperStackBuilder
Use the builder pattern for advanced configuration:Builder Methods
Set custom WebSocket server URL
Enable/disable automatic reconnection (default: true)
Set custom reconnection intervals for exponential backoff
Maximum number of reconnection attempts
Interval for sending WebSocket ping frames
Timeout for waiting for initial data after subscription
Limit the maximum number of entries cached per view
Remove the limit on cached entries (use with caution)
Client Methods
connection_state
Get the current connection state:disconnect
Manually disconnect from the server:store
Access the underlying shared store:Type System
TheHyperStack client uses Rust’s type system to provide compile-time safety:
OreStack) defines its own Views type that provides access to stack-specific views.
Error Handling
Connection methods returnResult<HyperStack<S>, HyperStackError>:
Connection Lifecycle
- Connect - Establish WebSocket connection
- Subscribe - Automatically subscribe to views when accessed
- Stream - Receive real-time updates
- Reconnect - Automatically reconnect on connection loss (if enabled)
- Disconnect - Clean shutdown when client is dropped or manually disconnected
Best Practices
- Use
connect()for simple cases with default configuration - Use the builder pattern for production deployments requiring custom configuration
- Enable auto-reconnect for resilient applications
- Set appropriate timeouts based on your network conditions
- Use
max_entries_per_viewto limit memory usage in long-running applications