pub struct TaskStartupConfig {
pub concurrency: usize,
pub timeout: Duration,
pub enable_ready_check: bool,
pub ready_check_timeout: Duration,
}Expand description
任务启动配置
Fields§
§concurrency: usize任务启动并发度(默认为 CPU 核心数)
timeout: Duration任务启动超时时间(默认 30 秒)
enable_ready_check: bool是否启用任务就绪检查(默认 true)
ready_check_timeout: Duration就绪检查超时时间(默认 30 秒)
Implementations§
Source§impl TaskStartupConfig
impl TaskStartupConfig
Sourcepub fn with_concurrency(self, concurrency: usize) -> Self
pub fn with_concurrency(self, concurrency: usize) -> Self
设置启动并发度
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
设置启动超时时间
Sourcepub fn with_ready_check(self, enable: bool) -> Self
pub fn with_ready_check(self, enable: bool) -> Self
启用/禁用就绪检查
Sourcepub fn with_ready_check_timeout(self, timeout: Duration) -> Self
pub fn with_ready_check_timeout(self, timeout: Duration) -> Self
设置就绪检查超时时间
Trait Implementations§
Source§impl Clone for TaskStartupConfig
impl Clone for TaskStartupConfig
Source§fn clone(&self) -> TaskStartupConfig
fn clone(&self) -> TaskStartupConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TaskStartupConfig
impl Debug for TaskStartupConfig
Auto Trait Implementations§
impl Freeze for TaskStartupConfig
impl RefUnwindSafe for TaskStartupConfig
impl Send for TaskStartupConfig
impl Sync for TaskStartupConfig
impl Unpin for TaskStartupConfig
impl UnsafeUnpin for TaskStartupConfig
impl UnwindSafe for TaskStartupConfig
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