Skip to main content

compose_selection

Function compose_selection 

Source
pub fn compose_selection(
    request: &PickerRequest,
    selected: &PickerItem,
) -> String
Expand description

Compose the line to resubmit when the user confirms selected from request (DOC-50 §3.2 PickerRequest contract: "{dispatch_command} {selected.id}").

Why: a free function (not a PickerRequest method — that type lives in crate::model, which must stay free of any TUI-driver-shaped API) so both this module’s dispatch_forward-adjacent flow and a future picker widget’s Enter-key handling share one composition rule. Test: tests::compose_selection_matches_picker_request_contract.