| 14 |
14 |
|
//!
|
| 15 |
15 |
|
//! # Finding 1: a handler cannot await, and this server's data layer is async
|
| 16 |
16 |
|
//!
|
| 17 |
|
- |
//! [`quasi_router::Handler`] is `fn(&S, Params) -> Result<Response, RouteError>`,
|
|
17 |
+ |
//! [`quasi_router::Handler`] is `fn(&S, Request) -> Result<Response, RouteError>`,
|
| 18 |
18 |
|
//! sync by quasi's decision 6, which was taken for egui-in-a-frame and
|
| 19 |
19 |
|
//! terminal-in-an-event-loop and matches the desktop apps' rusqlite store. This
|
| 20 |
20 |
|
//! server is async sqlx over Postgres end to end. `quasi-axum` runs the router
|
| 25 |
25 |
|
//!
|
| 26 |
26 |
|
//! # Finding 2: nothing carries identity into a handler
|
| 27 |
27 |
|
//!
|
| 28 |
|
- |
//! `quasi_http::decode` builds `Incoming { method, path, params }` and drops the
|
| 29 |
|
- |
//! header map. Params are the query string and the form body, which is to say
|
| 30 |
|
- |
//! things the client chose. A handler receives `&S`, which is shared, and those
|
|
28 |
+ |
//! `quasi_http::decode` builds the request and drops the header map. Its
|
|
29 |
+ |
//! parameters are the path captures, the form body and the query string, which
|
|
30 |
+ |
//! is to say things the route pattern fixed or the client chose. A handler receives `&S`, which is shared, and those
|
| 31 |
31 |
|
//! params. There is no session, no cookie, no `AuthUser`, and no side channel:
|
| 32 |
32 |
|
//! the doc comment on `Adapter::per_request` says so explicitly, and that
|
| 33 |
33 |
|
//! factory feeds the *renderer*, after dispatch, not the handler.
|
| 94 |
94 |
|
|
| 95 |
95 |
|
use docengine::DocLoader;
|
| 96 |
96 |
|
use quasi_axum::Adapter;
|
| 97 |
|
- |
use quasi_router::{Node, Params, RegionKind, Response, RouteError, Row, Screen, Slot};
|
|
97 |
+ |
use quasi_router::{Node, RegionKind, Request, Response, RouteError, Row, Screen, Slot};
|
| 98 |
98 |
|
use quasi_webview::{Shell, Webview};
|
| 99 |
99 |
|
|
| 100 |
100 |
|
/// The docs index, described.
|
| 101 |
101 |
|
///
|
| 102 |
102 |
|
/// Compare against `routes::pages::public::docs::docs_index`, which is the same
|
| 103 |
103 |
|
/// grouping over the same loader ending in `DocIndexTemplate`.
|
| 104 |
|
- |
fn docs_index(docs: &DocLoader, _params: Params) -> Result<Response, RouteError> {
|
|
104 |
+ |
fn docs_index(docs: &DocLoader, _request: Request) -> Result<Response, RouteError> {
|
| 105 |
105 |
|
// The grouping is the handler's either way. Describing a screen does not
|
| 106 |
106 |
|
// remove the domain pass over the index, and this is a fair copy of it.
|
| 107 |
107 |
|
let mut sections: Vec<(String, Vec<Row>)> = Vec::new();
|