pub struct TrainValidity {
pub from: String,
pub until: String,
pub carriers: Vec<String>,
pub excluded_service_brands: Option<Vec<String>>,
pub included_service_brands: Option<Vec<String>>,
pub scope: TrainValidityScope,
}Expand description
TrainValidity : Validity depending on boarding / leaving of a train. The ticket is valid from departure until the destination station in the train if departure or destination is within the from - until range. The validation can reference the departure or the destination time to decide the validity (e.g. Eurail/Interrail passes currently use the departure for the validity on night trains).
Fields§
§from: String§until: String§carriers: Vec<String>§excluded_service_brands: Option<Vec<String>>§included_service_brands: Option<Vec<String>>§scope: TrainValidityScopeImplementations§
Source§impl TrainValidity
impl TrainValidity
Sourcepub fn new(
from: String,
until: String,
carriers: Vec<String>,
scope: TrainValidityScope,
) -> TrainValidity
pub fn new( from: String, until: String, carriers: Vec<String>, scope: TrainValidityScope, ) -> TrainValidity
Validity depending on boarding / leaving of a train. The ticket is valid from departure until the destination station in the train if departure or destination is within the from - until range. The validation can reference the departure or the destination time to decide the validity (e.g. Eurail/Interrail passes currently use the departure for the validity on night trains).
Trait Implementations§
Source§impl Clone for TrainValidity
impl Clone for TrainValidity
Source§fn clone(&self) -> TrainValidity
fn clone(&self) -> TrainValidity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more