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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TrainValidity
impl Debug for TrainValidity
Source§impl Default for TrainValidity
impl Default for TrainValidity
Source§fn default() -> TrainValidity
fn default() -> TrainValidity
Source§impl<'de> Deserialize<'de> for TrainValidity
impl<'de> Deserialize<'de> for TrainValidity
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>,
Source§impl PartialEq for TrainValidity
impl PartialEq for TrainValidity
Source§fn eq(&self, other: &TrainValidity) -> bool
fn eq(&self, other: &TrainValidity) -> bool
self and other values to be equal, and is used by ==.