pub struct BatchConfig {
pub small_batch_threshold: usize,
}Expand description
批处理配置 (Batch Processing Configuration)
用于配置批量操作的优化参数。 (Configuration parameters for batch operation optimization)
§示例 (Examples)
use kestrel_timer::BatchConfig;
// 使用默认配置 (Use default configuration)
let config = BatchConfig::default();
// 自定义配置 (Custom configuration)
let config = BatchConfig {
small_batch_threshold: 20,
};Fields§
§small_batch_threshold: usize小批量阈值,用于批量取消优化 (Small batch threshold for batch cancellation optimization)
当批量取消的任务数量小于等于此值时,直接逐个取消而不进行分组排序 (When batch cancellation count is less than or equal to this value, cancel individually without grouping and sorting)
Trait Implementations§
Source§impl Clone for BatchConfig
impl Clone for BatchConfig
Source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
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 BatchConfig
impl Debug for BatchConfig
Auto Trait Implementations§
impl Freeze for BatchConfig
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnwindSafe for BatchConfig
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