pub struct TotalWeight {
pub unit_of_measure: UnitOfMeasure,
pub amount: String,
}Expand description
TotalWeight : The total weight of units that are sold by weight in a shipment.
Fields§
§unit_of_measure: UnitOfMeasureThe unit of measure for the weight of items that are ordered by cases and support pricing by weight.
amount: StringA decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation.
Pattern : ^-?(0|([1-9]\\d*))(\\.\\d+)?([eE][+-]?\\d+)?$.
Implementations§
Source§impl TotalWeight
impl TotalWeight
Sourcepub fn new(unit_of_measure: UnitOfMeasure, amount: String) -> TotalWeight
pub fn new(unit_of_measure: UnitOfMeasure, amount: String) -> TotalWeight
The total weight of units that are sold by weight in a shipment.
Trait Implementations§
Source§impl Clone for TotalWeight
impl Clone for TotalWeight
Source§fn clone(&self) -> TotalWeight
fn clone(&self) -> TotalWeight
Returns a duplicate 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 TotalWeight
impl Debug for TotalWeight
Source§impl Default for TotalWeight
impl Default for TotalWeight
Source§fn default() -> TotalWeight
fn default() -> TotalWeight
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TotalWeight
impl<'de> Deserialize<'de> for TotalWeight
Source§fn 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
Source§impl PartialEq for TotalWeight
impl PartialEq for TotalWeight
Source§impl Serialize for TotalWeight
impl Serialize for TotalWeight
impl StructuralPartialEq for TotalWeight
Auto Trait Implementations§
impl Freeze for TotalWeight
impl RefUnwindSafe for TotalWeight
impl Send for TotalWeight
impl Sync for TotalWeight
impl Unpin for TotalWeight
impl UnsafeUnpin for TotalWeight
impl UnwindSafe for TotalWeight
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