pub struct NativeStdScheduler { /* private fields */ }Expand description
Velox 内置默认标准库调度器后端(零外部依赖:常驻多线程池 + 单常驻最小堆定时器线程)。
Implementations§
Source§impl NativeStdScheduler
impl NativeStdScheduler
Sourcepub fn global() -> Arc<dyn SchedulerBackend> ⓘ
pub fn global() -> Arc<dyn SchedulerBackend> ⓘ
获取进程级共享默认 NativeStdScheduler 后端引用(零重复分配)。
Trait Implementations§
Source§impl Default for NativeStdScheduler
impl Default for NativeStdScheduler
Source§impl SchedulerBackend for NativeStdScheduler
impl SchedulerBackend for NativeStdScheduler
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
调度器名称(用于日志与能力诊断,如
"velox-native-std" / "velox-manual" / "tokio")。Source§fn capabilities(&self) -> SchedulerCapabilities
fn capabilities(&self) -> SchedulerCapabilities
返回当前调度器的能力描述符。
Source§fn spawn_background(&self, fut: BoxFuture<'static, ()>)
fn spawn_background(&self, fut: BoxFuture<'static, ()>)
在后台执行器中派发一个无返回值的
Send + 'static 异步任务。Auto Trait Implementations§
impl Forget for NativeStdScheduler
impl Freeze for NativeStdScheduler
impl Move for NativeStdScheduler
impl RefUnwindSafe for NativeStdScheduler
impl Send for NativeStdScheduler
impl Sync for NativeStdScheduler
impl Unpin for NativeStdScheduler
impl UnsafeUnpin for NativeStdScheduler
impl UnwindSafe for NativeStdScheduler
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> 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) 时执行闭包修饰自身,否则原样返回。