Skip to main content

Pinger

Trait Pinger 

Source
pub trait Pinger: Send + Sync {
    // Required methods
    fn from_options(options: PingOptions) -> Result<Self, PingCreationError>
       where Self: Sized;
    fn parse_fn(&self) -> fn(String) -> Option<PingResult>;
    fn ping_args(&self) -> (&str, Vec<String>);

    // Provided method
    fn start(&self) -> Result<Receiver<PingResult>, PingCreationError> { ... }
}

Required Methods§

Source

fn from_options(options: PingOptions) -> Result<Self, PingCreationError>
where Self: Sized,

Source

fn parse_fn(&self) -> fn(String) -> Option<PingResult>

Source

fn ping_args(&self) -> (&str, Vec<String>)

Provided Methods§

Implementors§