Enum google_api_proto::google::ads::admanager::v1::line_item_discount_type_enum::LineItemDiscountType
source · #[repr(i32)]pub enum LineItemDiscountType {
Unspecified = 0,
AbsoluteValue = 1,
Percentage = 2,
}
Expand description
Describes the possible discount types on the cost of booking a line item.
Variants§
Unspecified = 0
No value specified
AbsoluteValue = 1
An absolute value will be discounted from the line item’s cost.
Percentage = 2
A percentage of the cost will be discounted for booking the line item.
Implementations§
source§impl LineItemDiscountType
impl LineItemDiscountType
sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of LineItemDiscountType
.
sourcepub fn from_i32(value: i32) -> Option<LineItemDiscountType>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<LineItemDiscountType>
Converts an i32
to a LineItemDiscountType
, or None
if value
is not a valid variant.
source§impl LineItemDiscountType
impl LineItemDiscountType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for LineItemDiscountType
impl Clone for LineItemDiscountType
source§fn clone(&self) -> LineItemDiscountType
fn clone(&self) -> LineItemDiscountType
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 LineItemDiscountType
impl Debug for LineItemDiscountType
source§impl Default for LineItemDiscountType
impl Default for LineItemDiscountType
source§fn default() -> LineItemDiscountType
fn default() -> LineItemDiscountType
Returns the “default value” for a type. Read more
source§impl From<LineItemDiscountType> for i32
impl From<LineItemDiscountType> for i32
source§fn from(value: LineItemDiscountType) -> i32
fn from(value: LineItemDiscountType) -> i32
Converts to this type from the input type.
source§impl Hash for LineItemDiscountType
impl Hash for LineItemDiscountType
source§impl Ord for LineItemDiscountType
impl Ord for LineItemDiscountType
source§fn cmp(&self, other: &LineItemDiscountType) -> Ordering
fn cmp(&self, other: &LineItemDiscountType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LineItemDiscountType
impl PartialEq for LineItemDiscountType
source§fn eq(&self, other: &LineItemDiscountType) -> bool
fn eq(&self, other: &LineItemDiscountType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LineItemDiscountType
impl PartialOrd for LineItemDiscountType
source§fn partial_cmp(&self, other: &LineItemDiscountType) -> Option<Ordering>
fn partial_cmp(&self, other: &LineItemDiscountType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for LineItemDiscountType
impl TryFrom<i32> for LineItemDiscountType
§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
source§fn try_from(value: i32) -> Result<LineItemDiscountType, DecodeError>
fn try_from(value: i32) -> Result<LineItemDiscountType, DecodeError>
Performs the conversion.
impl Copy for LineItemDiscountType
impl Eq for LineItemDiscountType
impl StructuralPartialEq for LineItemDiscountType
Auto Trait Implementations§
impl Freeze for LineItemDiscountType
impl RefUnwindSafe for LineItemDiscountType
impl Send for LineItemDiscountType
impl Sync for LineItemDiscountType
impl Unpin for LineItemDiscountType
impl UnwindSafe for LineItemDiscountType
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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