pub struct PayloadDomain {
pub load_status: Option<LoadStatus>,
pub total_weight_kg: Option<f64>,
pub max_weight_kg: Option<f64>,
pub weight_utilization_pct: Option<f64>,
pub items: Option<Vec<PayloadItem>>,
pub item_count: Option<u32>,
pub compartments: Option<Vec<Compartment>>,
pub is_secured: Option<bool>,
pub center_of_mass_offset_m: Option<[f64; 3]>,
}Expand description
Payload domain containing load and item information.
Fields§
§load_status: Option<LoadStatus>Load status
total_weight_kg: Option<f64>Total weight in kg
max_weight_kg: Option<f64>Maximum weight capacity in kg
weight_utilization_pct: Option<f64>Weight utilization percentage
items: Option<Vec<PayloadItem>>Items being carried
item_count: Option<u32>Item count
compartments: Option<Vec<Compartment>>Compartments (for multi-compartment robots)
is_secured: Option<bool>Whether load is secured
center_of_mass_offset_m: Option<[f64; 3]>Center of mass offset (if tracked)
Implementations§
Source§impl PayloadDomain
impl PayloadDomain
Sourcepub fn with_weight(weight_kg: f64, max_weight_kg: f64) -> Self
pub fn with_weight(weight_kg: f64, max_weight_kg: f64) -> Self
Create payload with weight.
Sourcepub fn with_item(self, item: PayloadItem) -> Self
pub fn with_item(self, item: PayloadItem) -> Self
Add an item.
Sourcepub fn with_compartment(self, compartment: Compartment) -> Self
pub fn with_compartment(self, compartment: Compartment) -> Self
Add a compartment.
Trait Implementations§
Source§impl Clone for PayloadDomain
impl Clone for PayloadDomain
Source§fn clone(&self) -> PayloadDomain
fn clone(&self) -> PayloadDomain
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 PayloadDomain
impl Debug for PayloadDomain
Source§impl Default for PayloadDomain
impl Default for PayloadDomain
Source§fn default() -> PayloadDomain
fn default() -> PayloadDomain
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PayloadDomain
impl<'de> Deserialize<'de> for PayloadDomain
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 Serialize for PayloadDomain
impl Serialize for PayloadDomain
Auto Trait Implementations§
impl Freeze for PayloadDomain
impl RefUnwindSafe for PayloadDomain
impl Send for PayloadDomain
impl Sync for PayloadDomain
impl Unpin for PayloadDomain
impl UnwindSafe for PayloadDomain
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