Module iter

Module iter 

Source
Expand description

Iterators over the various resources stored in the cache.

The entry point to the module is InMemoryCacheIter. It exposes methods for creating iterators over various resource types, such as InMemoryCacheIter::integrations and InMemoryCacheIter::voice_states.

Creating an iterator returns a ResourceIter. The iterator implements the std::iter::Iterator trait and returns IterReferences.

IterReference exposes two methods: IterReference::key and IterReference::value, both returning immutable references to the underlying key and value. It also implements std::ops::Deref and dereferences to the value.

Structsยง

InMemoryCacheIter
Interface to create iterators over various resources.
IterReference
Reference to a resource value being iterated over in the cache.
ResourceIter
Generic iterator over key-value pairs of a resource.