pong-rs 0.3.3

A network monitoring tool that performs ICMP, TCP, and HTTP pings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::ping_error::PingError;
use async_trait::async_trait;

/// 执行器
#[async_trait]
pub trait Executor {
    /// 获取执行器的名称
    fn get_name(&self) -> String;

    /// 执行任务
    async fn exec(&self) -> Result<(), PingError>;
}