Struct square_api_client::models::OrderQuantityUnit
source · [−]pub struct OrderQuantityUnit {
pub measurement_unit: Option<MeasurementUnit>,
pub precision: Option<i32>,
pub catalog_object_id: Option<String>,
pub catalog_version: Option<i64>,
}
Expand description
Contains the measurement unit for a quantity and a precision that specifies the number of digits after the decimal point for decimal quantities.
Fields
measurement_unit: Option<MeasurementUnit>
A MeasurementUnit that represents the unit of measure for the quantity.
precision: Option<i32>
For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity.
For example, a precision of 1 allows quantities such as “1.0” and “1.1”, but not “1.01”.
Min: 0. Max: 5.
catalog_object_id: Option<String>
The catalog object ID referencing the [CatalogMeasurementUnit].
This field is set when this is a catalog-backed measurement unit.
catalog_version: Option<i64>
The version of the catalog object that this measurement unit references.
This field is set when this is a catalog-backed measurement unit.
Trait Implementations
sourceimpl Clone for OrderQuantityUnit
impl Clone for OrderQuantityUnit
sourcefn clone(&self) -> OrderQuantityUnit
fn clone(&self) -> OrderQuantityUnit
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for OrderQuantityUnit
impl Debug for OrderQuantityUnit
sourceimpl Default for OrderQuantityUnit
impl Default for OrderQuantityUnit
sourcefn default() -> OrderQuantityUnit
fn default() -> OrderQuantityUnit
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for OrderQuantityUnit
impl<'de> Deserialize<'de> for OrderQuantityUnit
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<OrderQuantityUnit> for OrderQuantityUnit
impl PartialEq<OrderQuantityUnit> for OrderQuantityUnit
sourcefn eq(&self, other: &OrderQuantityUnit) -> bool
fn eq(&self, other: &OrderQuantityUnit) -> bool
sourceimpl Serialize for OrderQuantityUnit
impl Serialize for OrderQuantityUnit
impl Eq for OrderQuantityUnit
impl StructuralEq for OrderQuantityUnit
impl StructuralPartialEq for OrderQuantityUnit
Auto Trait Implementations
impl RefUnwindSafe for OrderQuantityUnit
impl Send for OrderQuantityUnit
impl Sync for OrderQuantityUnit
impl Unpin for OrderQuantityUnit
impl UnwindSafe for OrderQuantityUnit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.