pub struct Offer {
Show 29 fields pub micros: Option<i64>, pub currency_code: Option<String>, pub formatted_amount: Option<String>, pub converted_price: Vec<Offer>, pub checkout_flow_required: Option<bool>, pub full_price_micros: Option<i64>, pub formatted_full_amount: Option<String>, pub offer_type: Option<i32>, pub rental_terms: Option<RentalTerms>, pub on_sale_date: Option<i64>, pub promotion_label: Vec<String>, pub subscription_terms: Option<SubscriptionTerms>, pub formatted_name: Option<String>, pub formatted_description: Option<String>, pub preorder: Option<bool>, pub on_sale_date_display_time_zone_offset_millis: Option<i32>, pub licensed_offer_type: Option<i32>, pub subscription_content_terms: Option<SubscriptionContentTerms>, pub offer_id: Option<String>, pub preorder_fulfillment_display_date: Option<i64>, pub license_terms: Option<LicenseTerms>, pub sale: Option<bool>, pub voucher_terms: Option<VoucherTerms>, pub offer_payment: Vec<OfferPayment>, pub repeat_last_payment: Option<bool>, pub buy_button_label: Option<String>, pub instant_purchase_enabled: Option<bool>, pub sale_end_timestamp: Option<i64>, pub sale_message: Option<String>,
}

Fields§

§micros: Option<i64>§currency_code: Option<String>§formatted_amount: Option<String>§converted_price: Vec<Offer>§checkout_flow_required: Option<bool>§full_price_micros: Option<i64>§formatted_full_amount: Option<String>§offer_type: Option<i32>§rental_terms: Option<RentalTerms>§on_sale_date: Option<i64>§promotion_label: Vec<String>§subscription_terms: Option<SubscriptionTerms>§formatted_name: Option<String>§formatted_description: Option<String>§preorder: Option<bool>§on_sale_date_display_time_zone_offset_millis: Option<i32>§licensed_offer_type: Option<i32>§subscription_content_terms: Option<SubscriptionContentTerms>§offer_id: Option<String>§preorder_fulfillment_display_date: Option<i64>§license_terms: Option<LicenseTerms>§sale: Option<bool>§voucher_terms: Option<VoucherTerms>§offer_payment: Vec<OfferPayment>§repeat_last_payment: Option<bool>§buy_button_label: Option<String>§instant_purchase_enabled: Option<bool>§sale_end_timestamp: Option<i64>§sale_message: Option<String>

Implementations§

source§

impl Offer

source

pub fn micros(&self) -> i64

Returns the value of micros, or the default value if micros is unset.

source

pub fn currency_code(&self) -> &str

Returns the value of currency_code, or the default value if currency_code is unset.

source

pub fn formatted_amount(&self) -> &str

Returns the value of formatted_amount, or the default value if formatted_amount is unset.

source

pub fn checkout_flow_required(&self) -> bool

Returns the value of checkout_flow_required, or the default value if checkout_flow_required is unset.

source

pub fn full_price_micros(&self) -> i64

Returns the value of full_price_micros, or the default value if full_price_micros is unset.

source

pub fn formatted_full_amount(&self) -> &str

Returns the value of formatted_full_amount, or the default value if formatted_full_amount is unset.

source

pub fn offer_type(&self) -> i32

Returns the value of offer_type, or the default value if offer_type is unset.

source

pub fn on_sale_date(&self) -> i64

Returns the value of on_sale_date, or the default value if on_sale_date is unset.

source

pub fn formatted_name(&self) -> &str

Returns the value of formatted_name, or the default value if formatted_name is unset.

source

pub fn formatted_description(&self) -> &str

Returns the value of formatted_description, or the default value if formatted_description is unset.

source

pub fn preorder(&self) -> bool

Returns the value of preorder, or the default value if preorder is unset.

source

pub fn on_sale_date_display_time_zone_offset_millis(&self) -> i32

Returns the value of on_sale_date_display_time_zone_offset_millis, or the default value if on_sale_date_display_time_zone_offset_millis is unset.

source

pub fn licensed_offer_type(&self) -> i32

Returns the value of licensed_offer_type, or the default value if licensed_offer_type is unset.

source

pub fn offer_id(&self) -> &str

Returns the value of offer_id, or the default value if offer_id is unset.

source

pub fn preorder_fulfillment_display_date(&self) -> i64

Returns the value of preorder_fulfillment_display_date, or the default value if preorder_fulfillment_display_date is unset.

source

pub fn sale(&self) -> bool

Returns the value of sale, or the default value if sale is unset.

source

pub fn repeat_last_payment(&self) -> bool

Returns the value of repeat_last_payment, or the default value if repeat_last_payment is unset.

source

pub fn buy_button_label(&self) -> &str

Returns the value of buy_button_label, or the default value if buy_button_label is unset.

source

pub fn instant_purchase_enabled(&self) -> bool

Returns the value of instant_purchase_enabled, or the default value if instant_purchase_enabled is unset.

source

pub fn sale_end_timestamp(&self) -> i64

Returns the value of sale_end_timestamp, or the default value if sale_end_timestamp is unset.

source

pub fn sale_message(&self) -> &str

Returns the value of sale_message, or the default value if sale_message is unset.

Trait Implementations§

source§

impl Clone for Offer

source§

fn clone(&self) -> Offer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Offer

source§

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

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

impl Default for Offer

source§

fn default() -> Self

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

impl Message for Offer

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Offer

source§

fn eq(&self, other: &Offer) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Offer

Auto Trait Implementations§

§

impl Freeze for Offer

§

impl RefUnwindSafe for Offer

§

impl Send for Offer

§

impl Sync for Offer

§

impl Unpin for Offer

§

impl UnwindSafe for Offer

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.