feat(axum): add interaction registry alias

Add an interactions()/on() registration path and move canonical examples off explicit register_handle naming while keeping low-level registry types available underneath.

req: axum_integration/003

req: ceremony/001

req: dx/003

req: examples/003
This commit is contained in:
slhx agent
2026-06-02 00:24:32 +02:00
parent f388fa7d91
commit df4b4cc649
7 changed files with 41 additions and 25 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ use axum::http::{header, HeaderMap};
use axum::response::IntoResponse;
use scraper::{Html, Selector};
use slhx_axum::{
handlers, runtime_js, DispatchRejection, EffectResponse, HandlerRegistry, InteractionForm,
interactions, runtime_js, DispatchRejection, EffectResponse, HandlerRegistry, InteractionForm,
InteractionFormRejection, InteractionRequest, PageMode, PageRequest, PageResponse,
SLHX_CONTENT_TYPE, SLHX_FINGERPRINT_HEADER, SLHX_PARTIAL_HEADER, SLHX_RUNTIME_CONTENT_TYPE,
SLHX_TITLE_HEADER,
@@ -148,7 +148,7 @@ fn interaction_request_dispatches_with_concise_handlers_helper() {
Vec::new(),
));
let response = request
.dispatch(handlers(BuildFingerprint(4)).register_handle(Handle::<()>::new(7), |_| {
.dispatch(interactions(BuildFingerprint(4)).on(Handle::<()>::new(7), |_| {
Slot::<String>::new(3).text("ok")
}))
.unwrap();