pub struct SchedulerCapabilities {
pub name: &'static str,
pub supports_background_threads: bool,
pub supports_dynamic_spawn: bool,
pub deterministic_clock: bool,
}Expand description
调度器能力描述符(用于诊断与运行时策略探测)。
Fields§
§name: &'static str调度器名称(如 "velox-native-std"、"velox-manual"、"tokio"、"smol")。
supports_background_threads: bool是否支持独立后台工作线程卸载(单线程 / WASM 为 false,桌面多线程为 true)。
supports_dynamic_spawn: bool是否支持在事件回调中动态派生异步协程。
deterministic_clock: bool是否采用可控确定性虚拟时钟(用于单元测试与时间快进)。
Trait Implementations§
Source§impl Clone for SchedulerCapabilities
impl Clone for SchedulerCapabilities
impl Copy for SchedulerCapabilities
Source§impl Debug for SchedulerCapabilities
impl Debug for SchedulerCapabilities
impl Eq for SchedulerCapabilities
Source§impl PartialEq for SchedulerCapabilities
impl PartialEq for SchedulerCapabilities
impl StructuralPartialEq for SchedulerCapabilities
Auto Trait Implementations§
impl Forget for SchedulerCapabilities
impl Freeze for SchedulerCapabilities
impl Move for SchedulerCapabilities
impl RefUnwindSafe for SchedulerCapabilities
impl Send for SchedulerCapabilities
impl Sync for SchedulerCapabilities
impl Unpin for SchedulerCapabilities
impl UnsafeUnpin for SchedulerCapabilities
impl UnwindSafe for SchedulerCapabilities
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。