Struct shippo::Parcel [−][src]
pub struct Parcel {}Show fields
pub object_state: String, pub object_created: Option<DateTime<Utc>>, pub object_updated: Option<DateTime<Utc>>, pub object_id: String, pub object_owner: String, pub length: String, pub width: String, pub height: String, pub distance_unit: String, pub weight: String, pub mass_unit: String, pub metadata: String, pub test: bool,
The data type for a parcel. FROM: https://goshippo.com/docs/reference#parcels
Fields
object_state: String
A Parcel will only be valid when all required values have been sent and validated successfully. “VALID”
object_created: Option<DateTime<Utc>>
Date and time of Parcel creation.
object_updated: Option<DateTime<Utc>>
Date and time of last Parcel update. Since you cannot update Parcels after they were created, this time stamp reflects the time when the Parcel was changed by Shippo’s systems for the last time, e.g., during sorting the dimensions given.
object_id: String
Unique identifier of the given Parcel object. This ID is required to create a Shipment object.
object_owner: String
Username of the user who created the Parcel object.
length: String
Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.
width: String
Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.
height: String
Height of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.
distance_unit: String
The unit used for length, width and height. “cm” | “in” | “ft” | “mm” | “m” | “yd”
weight: String
Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted.
mass_unit: String
The unit used for weight. “g” | “oz” | “lb” | “kg”
metadata: String
A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
test: bool
Indicates whether the object has been created in test mode.
Trait Implementations
impl<'de> Deserialize<'de> for Parcel
[src]
impl<'de> Deserialize<'de> for Parcel
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Parcel
impl Send for Parcel
impl Sync for Parcel
impl Unpin for Parcel
impl UnwindSafe for Parcel
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,