scannit_core::eticket

Struct ETicket

Source
pub struct ETicket {
Show 25 fields pub product_code: ProductCode, pub customer_profile: u8, pub language: Language, pub validity_length: ValidityLength, pub validity_area: ValidityArea, pub sale_datetime: DateTime<Utc>, pub sale_device: SaleDevice, pub ticket_fare_cents: u16, pub group_size: u8, pub extra_zone: bool, pub period_pass_validity_area: ValidityArea, pub extension_product_code: ProductCode, pub extension_1_validity_area: ValidityArea, pub extension_1_fare_cents: u16, pub extension_2_validity_area: ValidityArea, pub extension_2_fare_cents: u16, pub sale_status: bool, pub validity_start_datetime: DateTime<Utc>, pub validity_end_datetime: DateTime<Utc>, pub validity_status: bool, pub boarding_datetime: DateTime<Utc>, pub boarding_vehicle: u16, pub boarding_location: BoardingLocation, pub boarding_direction: BoardingDirection, pub boarding_area: BoardingArea,
}

Fields§

§product_code: ProductCode

If ProductCodeGroup is > 0, this returns ProductCodeGroup

§customer_profile: u8

If CustomerProfileGroup is > 0, this returns CustomerProfileGroup.

§language: Language§validity_length: ValidityLength

If ValidityLengthGroup is > 0 this returns ValidityLengthGroup.

§validity_area: ValidityArea§sale_datetime: DateTime<Utc>§sale_device: SaleDevice§ticket_fare_cents: u16

If TicketFareGroup is > 0 this returns TicketFareGroup.

§group_size: u8§extra_zone: bool

if true, this is an extra zone on top of a PeriodPass.

§period_pass_validity_area: ValidityArea

The validity area for the PeriodPass associated with the extra zone ticket.

§extension_product_code: ProductCode§extension_1_validity_area: ValidityArea§extension_1_fare_cents: u16§extension_2_validity_area: ValidityArea§extension_2_fare_cents: u16§sale_status: bool§validity_start_datetime: DateTime<Utc>§validity_end_datetime: DateTime<Utc>

If ValidityEndDateGroup and ValidityEndTimeGroup are > 0 this uses them instead.

§validity_status: bool

True if the ticket is currently valid.

§boarding_datetime: DateTime<Utc>§boarding_vehicle: u16§boarding_location: BoardingLocation§boarding_direction: BoardingDirection§boarding_area: BoardingArea

Trait Implementations§

Source§

impl Debug for ETicket

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.