pub struct SharedLookupConfig {
pub budget_bytes: usize,
pub max_scopes: usize,
pub key_len: usize,
}Expand description
2026-10-04: Cache settings (--prompt-lookup-shared-cache-*).
Fields§
§budget_bytes: usize2026-10-04: Host bytes for all scopes together.
max_scopes: usize2026-10-04: Most scopes held at once; each gets budget_bytes / max_scopes.
key_len: usize2026-10-04: Tokens a match must span (the prompt-lookup n-gram length or minimum match, whichever is longer).
Implementations§
Sourcepub fn scope_geometry(&self) -> Result<(usize, usize), String>
pub fn scope_geometry(&self) -> Result<(usize, usize), String>
2026-10-04: Slots and ring tokens of one scope: the largest power-of-two
slot table within half the scope’s bytes, and the ring in the rest.
Err when the ring would hold fewer than MIN_SCOPE_TOKENS.
Sourcepub fn scope_bytes(&self) -> Result<usize, String>
pub fn scope_bytes(&self) -> Result<usize, String>
2026-10-04: Bytes one scope allocates.
Trait Implementations§
Source§fn clone(&self) -> SharedLookupConfig
fn clone(&self) -> SharedLookupConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.