Function ustr::string_cache_iter

source ·
pub fn string_cache_iter() -> StringCacheIterator
Expand description

Return an iterator over the entire string cache.

If another thread is adding strings concurrently to this call then they might not show up in the view of the cache presented by this iterator.

§Safety

This returns an iterator to the state of the cache at the time when string_cache_iter() was called. It is of course possible that another thread will add more strings to the cache after this, but since we never destroy the strings, they remain valid, meaning it’s safe to iterate over them, the list just might not be completely up to date.