Skip to main content

simulate

Function simulate 

Source
pub fn simulate(
    config: &NsswitchConfig,
    name: &str,
    resolver: &mut impl SourceResolver,
) -> SimulationOutcome
Expand description

Walks the hosts: chain from nsswitch.conf in order, applying [STATUS=action] criteria exactly as glibc’s NSS dispatcher does: each source is tried, its result is classified into a status, and if that status has a matching criterion the configured action either halts the chain (return) or falls through to the next source (continue, the default when no criterion matches at all).