pub struct ItemSpec {
pub quantity: u32,
pub group_size: Option<u32>,
pub affinity: Option<Affinity>,
pub anti_affinity: Option<AntiAffinity>,
}Expand description
Details about how an item should be packed
Fields§
§quantity: u32The number of items that need to be packed
group_size: Option<u32>A size that items must always be grouped to when packed together. Bin assignments of this item will always be modulo this size.
affinity: Option<Affinity>An set of affinities that will result in asignments towards specific bins
anti_affinity: Option<AntiAffinity>An set of anti-affinities that will result in asignments away from specific bins
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemSpec
impl<'de> Deserialize<'de> for ItemSpec
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
Auto Trait Implementations§
impl Freeze for ItemSpec
impl RefUnwindSafe for ItemSpec
impl Send for ItemSpec
impl Sync for ItemSpec
impl Unpin for ItemSpec
impl UnwindSafe for ItemSpec
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