pub struct PreferencePattern {
pub tool: String,
pub command_pattern: Option<String>,
pub preferred_action: String,
pub sample_count: u32,
pub accept_rate: f64,
pub conditions: Vec<PreferenceCondition>,
pub confidence: f64,
}Expand description
A distilled preference pattern learned from the decision history. Compact representation: one pattern replaces many raw examples. May include conditions learned from context-enriched records.
Fields§
§tool: StringThe tool this pattern applies to (e.g. “Bash”, “Read”), or “*” for all.
command_pattern: Option<String>Optional command substring pattern (e.g. “rm -rf”, “git push –force”).
preferred_action: StringWhat the user typically wants for this pattern.
sample_count: u32How many decisions this pattern was distilled from.
accept_rate: f64Accept rate: 0.0 to 1.0.
conditions: Vec<PreferenceCondition>Conditions under which this preference applies (empty = unconditional).
confidence: f64Confidence in this pattern (0.0 to 1.0), higher when context-enriched.
Trait Implementations§
Source§impl Clone for PreferencePattern
impl Clone for PreferencePattern
Source§fn clone(&self) -> PreferencePattern
fn clone(&self) -> PreferencePattern
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§
impl Freeze for PreferencePattern
impl RefUnwindSafe for PreferencePattern
impl Send for PreferencePattern
impl Sync for PreferencePattern
impl Unpin for PreferencePattern
impl UnsafeUnpin for PreferencePattern
impl UnwindSafe for PreferencePattern
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more