Skip to main content

pong_rs/
executor.rs

1use crate::ping_error::PingError;
2use async_trait::async_trait;
3
4/// 执行器
5#[async_trait]
6pub trait Executor {
7    /// 获取执行器的名称
8    fn get_name(&self) -> String;
9
10    /// 执行任务
11    async fn exec(&self) -> Result<(), PingError>;
12}