pub struct PoisonSet {
cache: LruCache<String, ()>,
}Fields§
§cache: LruCache<String, ()>Implementations§
Source§impl PoisonSet
impl PoisonSet
pub fn new(capacity: usize) -> Self
Sourcepub fn key(tool: &str, selector: &str) -> String
pub fn key(tool: &str, selector: &str) -> String
The key for a tool call. \u{1} cannot appear in a tool name and is vanishingly unlikely in a
selector, so it is a safe separator (avoids tool="a", sel="b" colliding with tool="a b").
Sourcepub fn insert(&mut self, tool: &str, selector: &str)
pub fn insert(&mut self, tool: &str, selector: &str)
Record a poison key (marks it terminal). Touches LRU recency.
Sourcepub fn contains(&mut self, tool: &str, selector: &str) -> bool
pub fn contains(&mut self, tool: &str, selector: &str) -> bool
True if this exact (tool, selector) is known-poison. Touches recency so hot poisons stay.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl Freeze for PoisonSet
impl RefUnwindSafe for PoisonSet
impl Send for PoisonSet
impl Sync for PoisonSet
impl Unpin for PoisonSet
impl UnsafeUnpin for PoisonSet
impl UnwindSafe for PoisonSet
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