Enum google_api_proto::google::ads::googleads::v16::common::promotion_feed_item::DiscountType
source · pub enum DiscountType {
PercentOff(i64),
MoneyAmountOff(Money),
}
Expand description
Discount type, can be percentage off or amount off.
Variants§
PercentOff(i64)
Percentage off discount in the promotion in micros. One million is equivalent to one percent. Either this or money_off_amount is required.
MoneyAmountOff(Money)
Money amount off for discount in the promotion. Either this or percent_off is required.
Implementations§
source§impl DiscountType
impl DiscountType
sourcepub fn merge<B>(
field: &mut Option<DiscountType>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>(
field: &mut Option<DiscountType>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Clone for DiscountType
impl Clone for DiscountType
source§fn clone(&self) -> DiscountType
fn clone(&self) -> DiscountType
Returns a copy 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 DiscountType
impl Debug for DiscountType
source§impl PartialEq for DiscountType
impl PartialEq for DiscountType
source§fn eq(&self, other: &DiscountType) -> bool
fn eq(&self, other: &DiscountType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DiscountType
Auto Trait Implementations§
impl Freeze for DiscountType
impl RefUnwindSafe for DiscountType
impl Send for DiscountType
impl Sync for DiscountType
impl Unpin for DiscountType
impl UnwindSafe for DiscountType
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request