Skip to main content

replay_fixture

Function replay_fixture 

Source
pub fn replay_fixture(json: &str) -> Result<ReplayTransport>
Expand description

Reads a recorded run — a JSON array of events — into a transport.

The reason Transport is a trait: a fixture on disk substitutes for a server, and nothing above it changes. board-watch replay is the whole client with the network taken out.

§Errors

The file’s contents, if they are not a JSON array of events this build knows. An unknown event type is an error rather than a skipped line — see docs/DESIGN.md.