pub struct HarnessProfile {
pub provider_route: String,
pub model_pattern: String,
pub posture: HarnessPosture,
}Expand description
A harness profile binds a posture to a provider route and model pattern.
Fields§
§provider_route: StringProvider route this profile applies to, e.g. “deepseek” or “xiaomi-mimo”.
model_pattern: StringRegex or glob pattern for model names, e.g. “deepseek-v4.*”.
posture: HarnessPostureThe posture to apply.
Implementations§
Source§impl HarnessProfile
impl HarnessProfile
Sourcepub fn matches_route(&self, provider_route: &str, model: &str) -> bool
pub fn matches_route(&self, provider_route: &str, model: &str) -> bool
Return true when this profile applies to the provider/model route.
This is a pure config helper: matching a profile must not mutate runtime provider selection, prompts, auth, tools, context, or persisted config.
Trait Implementations§
Source§impl Clone for HarnessProfile
impl Clone for HarnessProfile
Source§fn clone(&self) -> HarnessProfile
fn clone(&self) -> HarnessProfile
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 moreSource§impl Debug for HarnessProfile
impl Debug for HarnessProfile
Source§impl Default for HarnessProfile
impl Default for HarnessProfile
Source§fn default() -> HarnessProfile
fn default() -> HarnessProfile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HarnessProfile
impl<'de> Deserialize<'de> for HarnessProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HarnessProfile
Source§impl PartialEq for HarnessProfile
impl PartialEq for HarnessProfile
Source§fn eq(&self, other: &HarnessProfile) -> bool
fn eq(&self, other: &HarnessProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for HarnessProfile
impl Serialize for HarnessProfile
impl StructuralPartialEq for HarnessProfile
Auto Trait Implementations§
impl Freeze for HarnessProfile
impl RefUnwindSafe for HarnessProfile
impl Send for HarnessProfile
impl Sync for HarnessProfile
impl Unpin for HarnessProfile
impl UnsafeUnpin for HarnessProfile
impl UnwindSafe for HarnessProfile
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.