pub struct TravelValidity {
pub valid_travel_dates: Option<Box<Calendar>>,
pub validity_range: Box<ValidityRange>,
pub excluded_time_ranges: Option<Vec<ExcludedTimeRange>>,
pub number_of_travel_days: Option<Option<i32>>,
pub return_constraint: Option<Box<ReturnConstraint>>,
pub train_validity: Option<Box<TrainValidity>>,
pub validity_type: Option<String>,
pub trip_allocation_constraint: Option<Box<TripAllocationConstraint>>,
pub trip_interruption_constraint: Option<Box<TripInterruptionConstraint>>,
}Expand description
TravelValidity : In distributor mode, travel validity data is needed to create barcode and control data (IRS 90918-4) even in case they have been checked during the on-line sale.
Fields§
§valid_travel_dates: Option<Box<Calendar>>§validity_range: Box<ValidityRange>§excluded_time_ranges: Option<Vec<ExcludedTimeRange>>time ranges excluded from the validity (e.g. off peak fulfillments)
number_of_travel_days: Option<Option<i32>>number of allowed travel days (e.g. 3 travel days within 2 weeks)
return_constraint: Option<Box<ReturnConstraint>>§train_validity: Option<Box<TrainValidity>>§validity_type: Option<String>Type of usage, either as single trip or multiple trips. Unrestricted fares might be combined into single trips if appropriate. Values from the Travel Validity Type Code List Values from the Tavel Validity Type Code List Listed values here are examples.
trip_allocation_constraint: Option<Box<TripAllocationConstraint>>§trip_interruption_constraint: Option<Box<TripInterruptionConstraint>>Implementations§
Source§impl TravelValidity
impl TravelValidity
Sourcepub fn new(validity_range: ValidityRange) -> TravelValidity
pub fn new(validity_range: ValidityRange) -> TravelValidity
In distributor mode, travel validity data is needed to create barcode and control data (IRS 90918-4) even in case they have been checked during the on-line sale.
Trait Implementations§
Source§impl Clone for TravelValidity
impl Clone for TravelValidity
Source§fn clone(&self) -> TravelValidity
fn clone(&self) -> TravelValidity
Returns a duplicate 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 Debug for TravelValidity
impl Debug for TravelValidity
Source§impl Default for TravelValidity
impl Default for TravelValidity
Source§fn default() -> TravelValidity
fn default() -> TravelValidity
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TravelValidity
impl<'de> Deserialize<'de> for TravelValidity
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 PartialEq for TravelValidity
impl PartialEq for TravelValidity
Source§impl Serialize for TravelValidity
impl Serialize for TravelValidity
impl StructuralPartialEq for TravelValidity
Auto Trait Implementations§
impl Freeze for TravelValidity
impl RefUnwindSafe for TravelValidity
impl Send for TravelValidity
impl Sync for TravelValidity
impl Unpin for TravelValidity
impl UnwindSafe for TravelValidity
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