Expand description
Handler trait and implementations for protocol-agnostic request handling
Structs§
- Handler
Fn - Wrapper for function-based handlers with no arguments
- Handler
With Args - Wrapper for handlers that accept typed, deserialized arguments
- Handler
With State - Wrapper for handlers that receive injected state and typed args
- Handler
With State Only - Wrapper for handlers that receive only injected state (no args)
- Json
- Wrapper that auto-serializes
T: Serializeto JSON. - State
- Newtype wrapper for injected state
- Stream
Receiver - Receiver half for streaming handlers.
- Stream
Sender - Sender half for streaming handlers.
- Streaming
Handler Fn - Streaming handler with no arguments (receives only StreamSender)
- Streaming
Handler With Args - Streaming handler that accepts typed, deserialized arguments
- Streaming
Handler With State - Streaming handler that receives injected state and typed args
- Streaming
Handler With State Only - Streaming handler that receives only injected state (no args)
Enums§
- Stream
Error - Errors that can occur when sending stream items.
Constants§
- DEFAULT_
STREAM_ CAPACITY - Default bounded channel capacity for streaming handlers.
Traits§
- Handler
- Handler trait for protocol-agnostic request handling
- Into
Handler Result - Trait for converting handler return values into
Result<String, String>. - Into
Stream Item - Trait for converting stream items into JSON strings.
- Stream
Handler - Trait for streaming handlers that send incremental updates during execution.
Type Aliases§
- Shared
State Map - Shared, type-keyed state map used by stateful handlers.