Skip to main content

Module request_state

Module request_state 

Source

Structs§

CurrentSession
NewSession
RequestState
Request-scoped typed value.
RequestStateKey
RequestStateStore
Request-scoped state storage.

Functions§

current_new_session
current_request_path
Read the normalized endpoint path for this request, when available.
current_session
current_session_user
Read the current session user JSON for this request, when an endpoint resolved one.
define_request_state
Define a typed request-scoped state value.
has_request_state
Returns true when the current async task has request state.
run_with_request_state
Run a future inside a fresh request state scope.
set_current_new_session
set_current_request_path
Store the normalized endpoint path for hooks running in this request.
set_current_session
set_current_session_user
Store the current session user JSON for after-response hooks in this request.