Expand description
Handler traits and implementations for processing environments.
This module provides a handler system that allows functions to process environments and extract parameters from them in various ways:
Handler- For immutable handlers that don’t change during executionHandlerMut- For mutable handlers that may modify their stateHandlerOnce- For single-use handlers that are consumed during processing
The module also provides utility functions to convert regular functions into handlers with automatic parameter extraction from environments.
Structs§
- AnyView
Builder - A builder for creating views from handler functions.
- Into
Handler - Wrapper that converts a function into a handler.
- Into
Handler Once - Wrapper that converts a function into a handler.
- Into
Handler With State - A wrapper that allows a handler function with state to be used as a regular handler.
Traits§
- Handler
- Handler trait that processes an environment and produces a result of type T.
- Handler
Fn - Function-like trait for immutable handlers that extract parameters from the environment.
- Handler
FnOnce - Function-like trait for single-use handlers that extract parameters from the environment.
- Handler
FnWith State - Function-like trait for immutable handlers that extract parameters from the environment with additional state.
- Handler
Once - Handler trait for single-use handlers that are consumed during execution.
- View
Builder - A trait for types that can repeatedly construct views.
Functions§
- into_
handler - Converts a function into an immutable handler.
- into_
handler_ once - Converts a single-use function into a one-time handler.
- into_
handler_ with_ state - Creates a handler with associated state from a handler function and state value.
Type Aliases§
- Action
Object - Type alias for an action handler that produces no result.
- BoxHandler
- A boxed handler with dynamic dispatch.
- BoxHandler
Once - A boxed one-time handler with dynamic dispatch.