Skip to main content

Service

Trait Service 

Source
pub trait Service: Send {
    // Required methods
    fn name(&self) -> &str;
    fn start(&self) -> Result<Box<dyn Running>, String>;

    // Provided method
    fn unavailable(&self) -> Option<String> { ... }
}
Expand description

Something that can be started for a test run.

Required Methods§

Source

fn name(&self) -> &str

What the tests call it.

Source

fn start(&self) -> Result<Box<dyn Running>, String>

Starts it and waits until it is ready.

Provided Methods§

Source

fn unavailable(&self) -> Option<String>

Why it cannot run on this machine, and how to get it so that it can; None when it can.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§