1use serde::{
2 Deserialize,
3 Serialize,
4};
5
6use crate::vector::Vector3;
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct Bin {
11 pub id: i32,
13 pub position: Vector3<u32>,
15 pub max_weight: u32,
17 pub weight_currently: u32,
19}
20impl Bin {
21 pub const fn new(
23 id: i32,
24 position: Vector3<u32>,
25 max_weight: u32,
26 weight_currently: u32,
27 ) -> Self {
28 Self {
29 id,
30 position,
31 max_weight,
32 weight_currently,
33 }
34 }
35}
36#[derive(Debug, Clone, Serialize, Deserialize)]
38pub struct SpaceLeftBin(pub u32);
39impl SpaceLeftBin {
40 pub const fn new(input: u32) -> Self {
42 Self(input)
43 }
44}