Expand description
Cleanroom Rust port of upstream Go source file: internal/memoization/memoization.go
Upstream Target Tag / Version: v2.1.0
Structs§
- HInt
- HInt is a type that implements the Hasher interface for integers.
- HString
- HString is a type that implements the Hasher interface for strings.
- Memo
Cache - MemoCache is a struct that represents a cache with a set capacity. It uses an LRU (Least Recently Used) eviction policy.
Traits§
- Hasher
- Hasher is an interface that requires a Hash method. The Hash method is expected to return a string representation of the hash of the object.
Functions§
- new_
memo_ cache - NewMemoCache is a function that creates a new MemoCache with a given capacity.