has_state!() { /* proc-macro */ }
Expand description

Checks if an existing state value can be found for the specified key.

Note that this function is infallible – it should never panic and will always return true or false.

Example

write_state!("my key", "hey")
assert_eq!(has_state!("my key"), true);
assert_eq!(has_state!("unknown key"), false);