pub struct Rule {
pub id: String,
pub scope: RuleScope,
pub pattern: String,
pub action: String,
pub source: RuleSource,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub version: u32,
pub confidence: f32,
pub usage_count: u64,
pub success_rate: f32,
pub metadata: Value,
}Expand description
A learned rule that guides code generation
Fields§
§id: StringUnique identifier for the rule
scope: RuleScopeScope where this rule is stored
pattern: StringPattern that triggers this rule
action: StringAction to take when pattern matches
source: RuleSourceSource of the rule
created_at: DateTime<Utc>When the rule was created
updated_at: DateTime<Utc>When the rule was last updated
version: u32Version number of the rule
confidence: f32Confidence score (0.0 to 1.0)
usage_count: u64Number of times this rule has been applied
success_rate: f32Success rate (0.0 to 1.0)
metadata: ValueAdditional metadata
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
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
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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