Skip to main content

gethashnode

Function gethashnode 

Source
pub fn gethashnode<'a, T: HashNodeFlags>(
    ht: &'a HashMap<String, T>,
    nam: &str,
) -> Option<&'a T>
Expand description

Port of gethashnode(HashTable ht, const char *nam) from Src/hashtable.c:231.

C body returns NULL if the entry has the DISABLED flag set; otherwise returns the node. Generic lookup helper — T must expose its DISABLED flag via the HashNodeFlags trait so the disabled filter applies. WARNING: param names don’t match C — Rust=(nam) vs C=(ht, nam)