pub struct SchedulerPlugin { /* private fields */ }Expand description
定时任务插件:cron 表达式调度
支持注册/移除/手动触发/列举任务。注意:本实现为任务注册中心,
实际调度需搭配 cron runner(如 tokio-cron-scheduler)。
Implementations§
Trait Implementations§
Source§impl Default for SchedulerPlugin
impl Default for SchedulerPlugin
Source§impl Plugin for SchedulerPlugin
impl Plugin for SchedulerPlugin
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
启动插件:验证连接、初始化资源 Read more
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
关闭插件:释放资源 Read more
Source§fn depends_on(&self) -> &[&str]
fn depends_on(&self) -> &[&str]
依赖的其他插件名称(用于拓扑排序,保证启动顺序) Read more
Auto Trait Implementations§
impl Freeze for SchedulerPlugin
impl !RefUnwindSafe for SchedulerPlugin
impl Send for SchedulerPlugin
impl Sync for SchedulerPlugin
impl Unpin for SchedulerPlugin
impl UnsafeUnpin for SchedulerPlugin
impl !UnwindSafe for SchedulerPlugin
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