Module twilight_cache_inmemory::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 IterReference
s.
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
- Interface to create iterators over various resources.
- Reference to a resource value being iterated over in the cache.
- Generic iterator over key-value pairs of a resource.