Detr

Struct Detr 

Source
pub struct Detr<'a> {
Show 18 fields pub issued_by: Option<&'a str>, pub org: Option<&'a str>, pub dst: Option<&'a str>, pub et: Option<&'a str>, pub er: Option<&'a str>, pub tour_code: Option<&'a str>, pub receipt_printed: bool, pub passenger: Option<&'a str>, pub exchange: Option<&'a str>, pub conj_tickets: Option<&'a str>, pub flight_segs: Vec<DetrFlightSeg<'a>>, pub fc: Option<&'a str>, pub fare: Option<DetrFareItem<'a>>, pub taxs: Option<HashMap<Option<&'a str>, DetrFareItem<'a>>>, pub total: Option<DetrFareItem<'a>>, pub fop: Option<&'a str>, pub oi: Option<&'a str>, pub tktn: Option<&'a str>,
}
Expand description

The result that detr text parsed.

Fields§

§issued_by: Option<&'a str>

airline issued by.

§org: Option<&'a str>

airport of departure

§dst: Option<&'a str>

airport of arrival

§et: Option<&'a str>

sale type of ticket,such as BSP-D,BSP-I,ARL-D,ARL-I.

§er: Option<&'a str>

remark/limit

§tour_code: Option<&'a str>

code of tour

§receipt_printed: bool

show that whether the itinerary receipt has printed.

§passenger: Option<&'a str>

the name of passenger.

§exchange: Option<&'a str>

proof of exchange.

§conj_tickets: Option<&'a str>

conjoint ticket.

§flight_segs: Vec<DetrFlightSeg<'a>>

the segments of flight.

§fc: Option<&'a str>

fare of FC.

§fare: Option<DetrFareItem<'a>>

face value of ticket.

§taxs: Option<HashMap<Option<&'a str>, DetrFareItem<'a>>>

tax value of ticket.

§total: Option<DetrFareItem<'a>>

total value of ticket.

§fop: Option<&'a str>

pay method.

§oi: Option<&'a str>§tktn: Option<&'a str>

ticket number.

Implementations§

Source§

impl<'a> Detr<'a>

Source

pub fn parse(text: &'a str) -> Result<Self>

Trait Implementations§

Source§

impl<'a> Debug for Detr<'a>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for Detr<'a>

Source§

fn default() -> Detr<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Detr<'a>

§

impl<'a> RefUnwindSafe for Detr<'a>

§

impl<'a> Send for Detr<'a>

§

impl<'a> Sync for Detr<'a>

§

impl<'a> Unpin for Detr<'a>

§

impl<'a> UnwindSafe for Detr<'a>

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.