Skip to main content

fire_fetched_responses

Function fire_fetched_responses 

Source
pub fn fire_fetched_responses<H: ScriptHost + Resource<Mutability = Mutable>>(
    host: ResMut<'_, H>,
    pending: Res<'_, PendingFetchReplies>,
    out: MessageWriter<'_, ScriptCommandEvent>,
)
Expand description

Invoke the script’s completion handler once for each reply collect_fetch_replies gathered. This is the only place a network reply crosses into script/signal land - the worker never touches the world, mirroring Slint’s invoke_from_event_loop.

fetch() replies preserve the historical contract: on_fetch(tag, body) on 2xx, on_fetch_error(tag, msg) on transport failure or non-2xx. http() replies fire on_http(tag, response) with the structured map for every completed request.