Loop over all the stashed states and issue a callback for each one.
If the callback returns a non-zero value, this will stop looping.
Callback to invoke per found stashed state. The most recent stash state will be enumerated first.
Extra parameter to callback function.
0 on success, non-zero callback return value, or error code.