MCPcopy Create free account
hub / github.com/acking-you/static_flow / new

Method new

crates/embedding/src/cache.rs:16–22  ·  view source on GitHub ↗
(max_entries: usize)

Source from the content-addressed store, hash-verified

14#[cfg(not(target_arch = "wasm32"))]
15impl<K: Copy + Eq + Hash, V> SmallModelCache<K, V> {
16 pub(super) fn new(max_entries: usize) -> Self {
17 Self {
18 max_entries: max_entries.max(1),
19 order: VecDeque::new(),
20 values: HashMap::new(),
21 }
22 }
23
24 pub(super) fn get_or_try_insert_mut<E, F>(&mut self, key: K, init: F) -> Result<&mut V, E>
25 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected