Skip to main content

has

Function has 

Source
pub fn has(key: &str) -> bool
Expand description

Is anything stored under key?

The typed readers cannot answer this: boolForKey: returns false for a key that was never set, which is indistinguishable from one set to false. A stored default has to win over the caller’s fallback, and only this says which case it is.