pub struct CellstateConfig {Show 13 fields
pub token_budget: i32,
pub section_priorities: SectionPriorities,
pub checkpoint_retention: i32,
pub stale_threshold: Duration,
pub contradiction_threshold: f32,
pub context_window_persistence: ContextPersistence,
pub validation_mode: ValidationMode,
pub embedding_provider: Option<ProviderConfig>,
pub summarization_provider: Option<ProviderConfig>,
pub llm_retry_config: RetryConfig,
pub lock_timeout: Duration,
pub message_retention: Duration,
pub delegation_timeout: Duration,
}Expand description
Master configuration struct. ALL values are required - no defaults anywhere.
Fields§
§token_budget: i32§section_priorities: SectionPriorities§checkpoint_retention: i32§stale_threshold: DurationStale threshold duration
contradiction_threshold: f32§context_window_persistence: ContextPersistence§validation_mode: ValidationMode§embedding_provider: Option<ProviderConfig>§summarization_provider: Option<ProviderConfig>§llm_retry_config: RetryConfig§lock_timeout: DurationLock timeout duration
message_retention: DurationMessage retention duration
delegation_timeout: DurationDelegation timeout duration
Implementations§
Source§impl CellstateConfig
impl CellstateConfig
Sourcepub fn default_context(token_budget: i32) -> Self
pub fn default_context(token_budget: i32) -> Self
Build a default context assembly configuration.
This centralizes the “sane defaults” that API routes can reuse without hardcoding policy in the IO layer.
Sourcepub fn validate(&self) -> CellstateResult<()>
pub fn validate(&self) -> CellstateResult<()>
Validate the configuration. Returns Ok(()) if valid, Err(CellstateError::Config) if invalid.
Validates:
- token_budget > 0
- contradiction_threshold in [0.0, 1.0]
- checkpoint_retention >= 0
- All duration values are positive
Trait Implementations§
Source§impl Clone for CellstateConfig
impl Clone for CellstateConfig
Source§fn clone(&self) -> CellstateConfig
fn clone(&self) -> CellstateConfig
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 ComposeSchema for CellstateConfig
impl ComposeSchema for CellstateConfig
Source§impl Debug for CellstateConfig
impl Debug for CellstateConfig
Source§impl<'de> Deserialize<'de> for CellstateConfig
impl<'de> Deserialize<'de> for CellstateConfig
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
Source§impl PartialEq for CellstateConfig
impl PartialEq for CellstateConfig
Source§impl Serialize for CellstateConfig
impl Serialize for CellstateConfig
Source§impl ToSchema for CellstateConfig
impl ToSchema for CellstateConfig
impl StructuralPartialEq for CellstateConfig
Auto Trait Implementations§
impl Freeze for CellstateConfig
impl RefUnwindSafe for CellstateConfig
impl Send for CellstateConfig
impl Sync for CellstateConfig
impl Unpin for CellstateConfig
impl UnwindSafe for CellstateConfig
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