Struct cucumber::server::Server
[−]
[src]
pub struct Server<R: CommandRunner + Send> { /* fields omitted */ }
The interface between an external Gherkin parser and internal Cucumber state
Provided with a CommandRunner, typically a WorldRunner, this struct cna be started and will monitor for incoming Cucumber Wire Protocol traffic. This should not need to be instantiated directly in most cases, as the start function addresses the typical use-case.
Example
use cucumber::WorldRunner; use cucumber::Server; fn main() { let world: u32 = 0; let mut runner = WorldRunner::new(world); let server = Server::new(runner); let (handle, stop_rx) = server.start(None); /* * Execute remote gherkin parser */ stop_rx.send(()).unwrap(); handle.join().unwrap(); }