pub enum ScenarioModifier {
RepeatDays(usize),
RepeatDaysNoise {
days: usize,
departure_time_noise: Duration,
},
ChangeMode {
pct_ppl: usize,
departure_filter: (Time, Time),
from_modes: BTreeSet<TripMode>,
to_mode: Option<TripMode>,
},
AddExtraTrips(String),
}
Expand description
Transforms an existing Scenario before instantiating it.
Variants§
RepeatDays(usize)
RepeatDaysNoise
ChangeMode
Fields
§
departure_filter: (Time, Time)
AddExtraTrips(String)
Scenario name
Implementations§
Trait Implementations§
Source§impl Clone for ScenarioModifier
impl Clone for ScenarioModifier
Source§fn clone(&self) -> ScenarioModifier
fn clone(&self) -> ScenarioModifier
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for ScenarioModifier
impl<'de> Deserialize<'de> for ScenarioModifier
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ScenarioModifier
impl Ord for ScenarioModifier
Source§fn cmp(&self, other: &ScenarioModifier) -> Ordering
fn cmp(&self, other: &ScenarioModifier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ScenarioModifier
impl PartialEq for ScenarioModifier
Source§impl PartialOrd for ScenarioModifier
impl PartialOrd for ScenarioModifier
Source§impl Serialize for ScenarioModifier
impl Serialize for ScenarioModifier
impl Eq for ScenarioModifier
impl StructuralPartialEq for ScenarioModifier
Auto Trait Implementations§
impl Freeze for ScenarioModifier
impl RefUnwindSafe for ScenarioModifier
impl Send for ScenarioModifier
impl Sync for ScenarioModifier
impl Unpin for ScenarioModifier
impl UnwindSafe for ScenarioModifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.