pub struct MatchContext<'a> {
pub server_id: Option<&'a str>,
pub tenant_id: Option<&'a str>,
pub tool: Option<&'a str>,
pub prompt: Option<&'a str>,
pub resource: Option<&'a str>,
pub agent: Option<&'a str>,
pub user: Option<&'a str>,
pub content_type: Option<&'a str>,
}Expand description
Bundle of optional context values used to evaluate a PluginCondition.
Each field corresponds to one of the condition’s gates. None means
“no value sourced from the extensions tree”; the condition then
rejects when the corresponding Some(set) is set on the condition
(i.e., the gate was specified but couldn’t be evaluated).
Replaces an 8-arg matches(...) call where every arg was
Option<&str> and could be misordered silently.
Fields§
§server_id: Option<&'a str>§tenant_id: Option<&'a str>§tool: Option<&'a str>§prompt: Option<&'a str>§resource: Option<&'a str>§agent: Option<&'a str>§user: Option<&'a str>§content_type: Option<&'a str>Trait Implementations§
Source§impl<'a> Clone for MatchContext<'a>
impl<'a> Clone for MatchContext<'a>
Source§fn clone(&self) -> MatchContext<'a>
fn clone(&self) -> MatchContext<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for MatchContext<'a>
Source§impl<'a> Debug for MatchContext<'a>
impl<'a> Debug for MatchContext<'a>
Source§impl<'a> Default for MatchContext<'a>
impl<'a> Default for MatchContext<'a>
Source§fn default() -> MatchContext<'a>
fn default() -> MatchContext<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for MatchContext<'a>
impl<'a> RefUnwindSafe for MatchContext<'a>
impl<'a> Send for MatchContext<'a>
impl<'a> Sync for MatchContext<'a>
impl<'a> Unpin for MatchContext<'a>
impl<'a> UnsafeUnpin for MatchContext<'a>
impl<'a> UnwindSafe for MatchContext<'a>
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