pub struct ReductionGranted {
pub carrier: Option<String>,
pub country: Option<String>,
pub transport_modes: Option<Vec<Mode>>,
pub service_bands: Option<Vec<String>>,
pub description: Box<Text>,
pub percentage: Option<f32>,
}Expand description
ReductionGranted : reductions granted by a reduction card type. Either carrier or country must be provided.
Fields§
§carrier: Option<String>Identifies a company. For rail, a RICS company code or compatible ERA company code are used. E.g.: ‘urn:uic:rics:1185:000011’
country: Option<String>ISO 3166-1 alpha-2 2 character country code
transport_modes: Option<Vec<Mode>>transport modes where the reduction is granted, any mode of the carrier in case the list is not provided.
service_bands: Option<Vec<String>>ServiceBrands where the reduction is granted, any service brand of the carrier in case the list is not provided.
description: Box<Text>§percentage: Option<f32>Implementations§
Source§impl ReductionGranted
impl ReductionGranted
Sourcepub fn new(description: Text) -> ReductionGranted
pub fn new(description: Text) -> ReductionGranted
reductions granted by a reduction card type. Either carrier or country must be provided.
Trait Implementations§
Source§impl Clone for ReductionGranted
impl Clone for ReductionGranted
Source§fn clone(&self) -> ReductionGranted
fn clone(&self) -> ReductionGranted
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 ReductionGranted
impl Debug for ReductionGranted
Source§impl Default for ReductionGranted
impl Default for ReductionGranted
Source§fn default() -> ReductionGranted
fn default() -> ReductionGranted
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ReductionGranted
impl<'de> Deserialize<'de> for ReductionGranted
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 ReductionGranted
impl PartialEq for ReductionGranted
Source§impl Serialize for ReductionGranted
impl Serialize for ReductionGranted
impl StructuralPartialEq for ReductionGranted
Auto Trait Implementations§
impl Freeze for ReductionGranted
impl RefUnwindSafe for ReductionGranted
impl Send for ReductionGranted
impl Sync for ReductionGranted
impl Unpin for ReductionGranted
impl UnwindSafe for ReductionGranted
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