StructsΒ§
- AppJson π
- Wrapper over
Tto make it a json request response - KeySchema π
- Schema describing a well-known meta key.
- Meta
Edit Form - Meta
Merge Form - User
Error Response - Value
Input Query - Query params for the value-input HTMX endpoint.
EnumsΒ§
- KeyType π
- The type of value expected for a well-known meta key.
- Meta
Change π - A single change between the consensus and a proposal.
- Request
Error - Whatever can go wrong with a request
ConstantsΒ§
- META_
DELETE_ ROUTE - META_
MERGE_ ROUTE - META_
RESET_ ROUTE - META_
SET_ ROUTE - META_
SUBMIT_ ROUTE - META_
VALUE_ INPUT_ ROUTE
StaticsΒ§
- WELL_
KNOWN_ πKEYS
FunctionsΒ§
- compute_
changes π - Computes an itemized list of changes between
consensusandproposal. - convert_
input_ πvalue - Converts raw form input to a
serde_json::Valueappropriate for the given key type. - format_
value_ πfor_ display - Formats a meta value for human-readable display, using the key schema when available (e.g. UNIX timestamps become formatted dates).
- get_
consensus_ πmap - Helper to fetch the current consensus as a JSON object map.
- get_
value_ input - HTMX endpoint: returns a type-appropriate value input for the selected key
(primary
outerHTMLswap on#add-value), plus OOB swaps for the description hint and the Set/Delete buttons. - parse_
proposal π - Parses json_content into a JSON object map, returning empty map on failure.
- post_
delete - post_
merge - post_
reset - post_
set - post_
submit - render
- render_
changes_ πsummary - Renders the βProposed changesβ summary from a list of
MetaChanges. - render_
consensus_ πsummary - Renders an itemized summary of all key-value pairs in a meta map, formatting values using their schema when available.
- render_
delete_ πbutton - Renders the Delete button (visible) or a hidden placeholder (invisible).
Uses
outerHTMLOOB swap when returned from the HTMX endpoint. - render_
key_ πpicker - Renders a dropdown picker for well-known keys (plus any extra keys from
the current proposal). Picking a key copies it into the
#add-keytext input and triggers its HTMXchangeevent, then resets itself to ββΎβ. - render_
meta_ edit_ form - render_
set_ πbutton - Renders the Set button. When there is no Delete button next to it,
rounded-endis added so Bootstrap applies right border-radius despite the hidden placeholder that follows. - render_
submissions_ πform - render_
value_ πdescription - Renders the description hint for a well-known key (if any), including a type hint for Amount and DateTime fields whose unit labels are no longer shown inline in the input-group.
- render_
value_ πinput - Renders the appropriate HTML input element for the given key type.