pub struct StockPiece {
pub width: usize,
pub length: usize,
pub pattern_direction: PatternDirection,
pub price: usize,
pub quantity: Option<usize>,
}Expand description
A rectangular stock piece that is available to cut one or more cut pieces from.
Fields§
§width: usizeWidth of rectangular stock piece.
length: usizeLength of rectangular stock piece.
pattern_direction: PatternDirectionPattern direction of stock piece.
price: usizePrice to use to optimize for price when not all stock pieces are the same price per unit area. If optimizing for less waste instead, price can be set to 0 for all stock pieces.
quantity: Option<usize>Quantity of this stock piece available for optimization. None means infinite quantity.
Trait Implementations§
Source§impl Clone for StockPiece
impl Clone for StockPiece
Source§fn clone(&self) -> StockPiece
fn clone(&self) -> StockPiece
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 StockPiece
impl Debug for StockPiece
Source§impl Hash for StockPiece
impl Hash for StockPiece
Source§impl PartialEq for StockPiece
impl PartialEq for StockPiece
impl Copy for StockPiece
impl Eq for StockPiece
impl StructuralPartialEq for StockPiece
Auto Trait Implementations§
impl Freeze for StockPiece
impl RefUnwindSafe for StockPiece
impl Send for StockPiece
impl Sync for StockPiece
impl Unpin for StockPiece
impl UnwindSafe for StockPiece
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