Skip to main content

switch_map

Function switch_map 

Source
pub fn switch_map(
    core: &Core,
    binding: &Arc<dyn HigherOrderBinding>,
    source: NodeId,
    project: ProjectFn,
) -> NodeId
Expand description

switch_map(source, project) — for each outer DATA, cancel the previous inner subscription and subscribe to the inner node returned by project(value). Inner DATA flows through to downstream; inner COMPLETE clears the active slot; outer COMPLETE (with no active inner) self-completes the operator.