pub struct BatchConfig {
pub small_batch_threshold: usize,
}Expand description
批处理配置
用于配置批量操作的优化参数。
§示例
use kestrel_protocol_timer::BatchConfig;
// 使用默认配置
let config = BatchConfig::default();
// 自定义配置
let config = BatchConfig {
small_batch_threshold: 20,
};Fields§
§small_batch_threshold: usize小批量阈值,用于批量取消优化
当批量取消的任务数量小于等于此值时,直接逐个取消而不进行分组排序
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