pub enum Injection {
Cancel {
journey: String,
},
Delay {
journey: String,
minutes: i64,
},
NoRealtime,
ServerVersion(String),
Fixture {
endpoint: Endpoint,
name: String,
},
Fail(Failure),
Slow(Duration),
Malformed,
}Expand description
A change to the answers of the sim. Injections stay until
Sim::clear.
Variants§
Cancel
Cancels a journey, by the ref of its JourneyDetailRef: its
departures, arrivals and legs, and its stops. Realtime times go.
Delay
Delays a journey: its realtime times become the scheduled ones plus
minutes.
NoRealtime
Removes the realtime data: times, tracks and prognoses.
ServerVersion(String)
Answers with another serverVersion.
Fixture
Answers a service with another fixture of the version, like
departureBoard-cancellations.json.
Fail(Failure)
Answers with an error.
Slow(Duration)
Waits this long before answering.
Malformed
Answers every request with a body that is not JSON.
Trait Implementations§
impl StructuralPartialEq for Injection
Auto Trait Implementations§
impl Forget for Injection
impl Freeze for Injection
impl Move for Injection
impl RefUnwindSafe for Injection
impl Send for Injectionwhere
RawVecInner: Send,
impl Sync for Injectionwhere
RawVecInner: Sync,
impl Unpin for Injection
impl UnsafeUnpin for Injection
impl UnwindSafe for Injectionwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more