pub struct TimerConfigBuilder { /* private fields */ }Expand description
顶层定时器配置构建器 (Top-level Timer Configuration Builder)
Implementations§
Source§impl TimerConfigBuilder
impl TimerConfigBuilder
Sourcepub fn command_channel_capacity(self, capacity: usize) -> Self
pub fn command_channel_capacity(self, capacity: usize) -> Self
设置命令通道容量 (Set command channel capacity)
Sourcepub fn timeout_channel_capacity(self, capacity: usize) -> Self
pub fn timeout_channel_capacity(self, capacity: usize) -> Self
设置超时通道容量 (Set timeout channel capacity)
Sourcepub fn small_batch_threshold(self, threshold: usize) -> Self
pub fn small_batch_threshold(self, threshold: usize) -> Self
设置小批量阈值 (Set small batch threshold)
Sourcepub fn build(self) -> Result<TimerConfig, TimerError>
pub fn build(self) -> Result<TimerConfig, TimerError>
构建配置并进行验证 (Build and validate configuration)
§返回 (Returns)
Ok(TimerConfig): 配置有效 (Configuration is valid)Err(TimerError): 配置验证失败 (Configuration validation failed)
Trait Implementations§
Source§impl Debug for TimerConfigBuilder
impl Debug for TimerConfigBuilder
Auto Trait Implementations§
impl Freeze for TimerConfigBuilder
impl RefUnwindSafe for TimerConfigBuilder
impl Send for TimerConfigBuilder
impl Sync for TimerConfigBuilder
impl Unpin for TimerConfigBuilder
impl UnwindSafe for TimerConfigBuilder
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