Module handler

Module handler 

Source
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 execution
  • HandlerMut - For mutable handlers that may modify their state
  • HandlerOnce - 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§

AnyViewBuilder
A builder for creating views from handler functions.
IntoHandler
Wrapper that converts a function into a handler.
IntoHandlerOnce
Wrapper that converts a function into a handler.
IntoHandlerWithState
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.
HandlerFn
Function-like trait for immutable handlers that extract parameters from the environment.
HandlerFnOnce
Function-like trait for single-use handlers that extract parameters from the environment.
HandlerFnWithState
Function-like trait for immutable handlers that extract parameters from the environment with additional state.
HandlerOnce
Handler trait for single-use handlers that are consumed during execution.
ViewBuilder
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§

ActionObject
Type alias for an action handler that produces no result.
BoxHandler
A boxed handler with dynamic dispatch.
BoxHandlerOnce
A boxed one-time handler with dynamic dispatch.