pub struct Context {
pub values: HashMap<String, String>,
/* private fields */
}Expand description
Cross-cutting request context passed through algorithms and LLM clients.
Fields§
§values: HashMap<String, String>Caller-specific values propagated through the request.
Implementations§
Source§impl Context
impl Context
Sourcepub fn exclude_target(&mut self, target: impl Into<String>) -> bool
pub fn exclude_target(&mut self, target: impl Into<String>) -> bool
Excludes a target from this request, returning whether it was newly excluded.
Re-excluding returns false, which is what bounds the overflow retry once every
target has been tried.
Sourcepub fn is_excluded(&self, target: &str) -> bool
pub fn is_excluded(&self, target: &str) -> bool
Whether this request is barred from routing to target.
Trait Implementations§
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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