pub struct EncoderConfig {
pub include_type_hints: bool,
pub canonical: bool,
pub enable_checksums: bool,
pub enable_explain_mode: bool,
pub prompt_optimization: PromptOptimizationConfig,
pub normalization_config: NormalizationConfig,
pub equivalence_mapper: Option<EquivalenceMapper>,
pub semantic_dictionary: Option<SemanticDictionary>,
}Expand description
Encoder configuration
Fields§
§include_type_hints: boolWhether to include type hints in output
canonical: boolWhether to use canonical format (always true for v0.2)
enable_checksums: boolWhether to append semantic checksums (v0.3 feature)
enable_explain_mode: boolWhether to enable explain mode with inline comments (v0.3 feature)
prompt_optimization: PromptOptimizationConfigPrompt optimization configuration (v0.3 feature)
normalization_config: NormalizationConfigValue normalization configuration (v0.3 feature)
equivalence_mapper: Option<EquivalenceMapper>Semantic equivalence mapper (v0.3 feature)
semantic_dictionary: Option<SemanticDictionary>Optional semantic dictionary for value normalization
Implementations§
Source§impl EncoderConfig
impl EncoderConfig
Sourcepub fn with_checksums(self, enable: bool) -> Self
pub fn with_checksums(self, enable: bool) -> Self
Enables semantic checksums
Sourcepub fn with_explain_mode(self, enable: bool) -> Self
pub fn with_explain_mode(self, enable: bool) -> Self
Enables explain mode with inline comments
Sourcepub fn with_prompt_optimization(self, config: PromptOptimizationConfig) -> Self
pub fn with_prompt_optimization(self, config: PromptOptimizationConfig) -> Self
Sets prompt optimization configuration
Sourcepub fn with_normalization(self, config: NormalizationConfig) -> Self
pub fn with_normalization(self, config: NormalizationConfig) -> Self
Sets value normalization configuration
Sourcepub fn with_equivalence_mapper(self, mapper: EquivalenceMapper) -> Self
pub fn with_equivalence_mapper(self, mapper: EquivalenceMapper) -> Self
Sets semantic equivalence mapper
Sourcepub fn with_semantic_dictionary(self, dict: SemanticDictionary) -> Self
pub fn with_semantic_dictionary(self, dict: SemanticDictionary) -> Self
Attaches a semantic dictionary for normalization.
Sourcepub fn with_type_hints(self, enable: bool) -> Self
pub fn with_type_hints(self, enable: bool) -> Self
Enables type hints in output
Sourcepub fn with_canonical(self, enable: bool) -> Self
pub fn with_canonical(self, enable: bool) -> Self
Sets canonical format mode
Trait Implementations§
Source§impl Clone for EncoderConfig
impl Clone for EncoderConfig
Source§fn clone(&self) -> EncoderConfig
fn clone(&self) -> EncoderConfig
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 moreSource§impl Debug for EncoderConfig
impl Debug for EncoderConfig
Auto Trait Implementations§
impl Freeze for EncoderConfig
impl RefUnwindSafe for EncoderConfig
impl Send for EncoderConfig
impl Sync for EncoderConfig
impl Unpin for EncoderConfig
impl UnwindSafe for EncoderConfig
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