Skip to main content

Module handler

Module handler 

Source
Expand description

Handler trait and implementations for protocol-agnostic request handling

Structs§

HandlerFn
Wrapper for function-based handlers with no arguments
HandlerWithArgs
Wrapper for handlers that accept typed, deserialized arguments
HandlerWithState
Wrapper for handlers that receive injected state and typed args
HandlerWithStateOnly
Wrapper for handlers that receive only injected state (no args)
Json
Wrapper that auto-serializes T: Serialize to JSON.
State
Newtype wrapper for injected state
StreamReceiver
Receiver half for streaming handlers.
StreamSender
Sender half for streaming handlers.
StreamingHandlerFn
Streaming handler with no arguments (receives only StreamSender)
StreamingHandlerWithArgs
Streaming handler that accepts typed, deserialized arguments
StreamingHandlerWithState
Streaming handler that receives injected state and typed args
StreamingHandlerWithStateOnly
Streaming handler that receives only injected state (no args)

Enums§

StreamError
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
IntoHandlerResult
Trait for converting handler return values into Result<String, String>.
IntoStreamItem
Trait for converting stream items into JSON strings.
StreamHandler
Trait for streaming handlers that send incremental updates during execution.

Type Aliases§

SharedStateMap
Shared, type-keyed state map used by stateful handlers.