pub struct ForgeConfigBuilder { /* private fields */ }
Expand description
配置构建器
Implementations§
Source§impl ForgeConfigBuilder
impl ForgeConfigBuilder
Sourcepub fn from_config(config: ForgeConfig) -> Self
pub fn from_config(config: ForgeConfig) -> Self
从现有配置创建构建器
Sourcepub fn environment(self, env: Environment) -> Self
pub fn environment(self, env: Environment) -> Self
设置运行环境
Sourcepub fn processor_config(self, config: ProcessorConfig) -> Self
pub fn processor_config(self, config: ProcessorConfig) -> Self
设置处理器配置
Sourcepub fn performance_config(self, config: PerformanceConfig) -> Self
pub fn performance_config(self, config: PerformanceConfig) -> Self
设置性能配置
Sourcepub fn event_config(self, config: EventConfig) -> Self
pub fn event_config(self, config: EventConfig) -> Self
设置事件配置
Sourcepub fn history_config(self, config: HistoryConfig) -> Self
pub fn history_config(self, config: HistoryConfig) -> Self
设置历史记录配置
Sourcepub fn extension_config(self, config: ExtensionConfig) -> Self
pub fn extension_config(self, config: ExtensionConfig) -> Self
设置扩展配置
Sourcepub fn cache_config(self, config: CacheConfig) -> Self
pub fn cache_config(self, config: CacheConfig) -> Self
设置缓存配置
Sourcepub fn max_queue_size(self, size: usize) -> Self
pub fn max_queue_size(self, size: usize) -> Self
设置任务队列大小
Sourcepub fn max_concurrent_tasks(self, count: usize) -> Self
pub fn max_concurrent_tasks(self, count: usize) -> Self
设置最大并发任务数
Sourcepub fn task_timeout(self, timeout: Duration) -> Self
pub fn task_timeout(self, timeout: Duration) -> Self
设置任务超时时间
Sourcepub fn middleware_timeout(self, timeout_ms: u64) -> Self
pub fn middleware_timeout(self, timeout_ms: u64) -> Self
设置中间件超时时间
Sourcepub fn enable_monitoring(self, enable: bool) -> Self
pub fn enable_monitoring(self, enable: bool) -> Self
启用/禁用性能监控
Sourcepub fn history_limit(self, limit: usize) -> Self
pub fn history_limit(self, limit: usize) -> Self
设置历史记录最大条数
Sourcepub fn build(self) -> Result<ForgeConfig, ConfigValidationError>
pub fn build(self) -> Result<ForgeConfig, ConfigValidationError>
构建配置并验证
Sourcepub fn build_unchecked(self) -> ForgeConfig
pub fn build_unchecked(self) -> ForgeConfig
构建配置但不验证(用于测试或特殊情况)
Trait Implementations§
Source§impl Clone for ForgeConfigBuilder
impl Clone for ForgeConfigBuilder
Source§fn clone(&self) -> ForgeConfigBuilder
fn clone(&self) -> ForgeConfigBuilder
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 ForgeConfigBuilder
impl Debug for ForgeConfigBuilder
Auto Trait Implementations§
impl Freeze for ForgeConfigBuilder
impl RefUnwindSafe for ForgeConfigBuilder
impl Send for ForgeConfigBuilder
impl Sync for ForgeConfigBuilder
impl Unpin for ForgeConfigBuilder
impl UnwindSafe for ForgeConfigBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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