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

An analogue for has_state! that should only be used within proc macros.

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

use macro_state::*;

proc_write_state("my key", "hey").unwrap();
assert_eq!(proc_has_state("my key"), true);
assert_eq!(proc_has_state("unknown key"), false);

Internally this function simply calls proc_read_state, returning false in the event of an IO error.