pub struct GepGene {
pub gene_type: String,
pub schema_version: String,
pub id: String,
pub category: GeneCategory,
pub signals_match: Vec<SignalPattern>,
pub preconditions: Vec<GenePrecondition>,
pub strategy: Vec<String>,
pub constraints: GeneConstraints,
pub validation: Vec<String>,
pub epigenetic_marks: Vec<EpigeneticMark>,
pub model_name: Option<String>,
pub asset_id: String,
}Expand description
GEP-compatible Gene definition
Fields§
§gene_type: StringAsset type - always “Gene”
schema_version: StringProtocol schema version
id: StringUnique identifier
category: GeneCategoryCategory - repair, optimize, or innovate
signals_match: Vec<SignalPattern>Patterns that trigger this gene
preconditions: Vec<GenePrecondition>Conditions that must hold before use
strategy: Vec<String>Ordered, actionable steps
constraints: GeneConstraintsSafety constraints
validation: Vec<String>Commands to verify correctness after execution
epigenetic_marks: Vec<EpigeneticMark>Runtime-applied behavioral modifiers
model_name: Option<String>LLM model that produced this gene
asset_id: StringContent-addressable hash
Implementations§
Source§impl GepGene
impl GepGene
Sourcepub fn new(
id: String,
category: GeneCategory,
signals_match: Vec<String>,
strategy: Vec<String>,
validation: Vec<String>,
) -> Result<Self, AssetIdError>
pub fn new( id: String, category: GeneCategory, signals_match: Vec<String>, strategy: Vec<String>, validation: Vec<String>, ) -> Result<Self, AssetIdError>
Create a new GEP Gene with computed asset_id
Sourcepub fn matches_signals(&self, signals: &[String]) -> usize
pub fn matches_signals(&self, signals: &[String]) -> usize
Check if this gene matches the given signals
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GepGene
impl<'de> Deserialize<'de> for GepGene
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 GepGene
impl RefUnwindSafe for GepGene
impl Send for GepGene
impl Sync for GepGene
impl Unpin for GepGene
impl UnsafeUnpin for GepGene
impl UnwindSafe for GepGene
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