Struct cut_optimizer_2d::StockPiece
source · [−]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: usize
Width of rectangular stock piece.
length: usize
Length of rectangular stock piece.
pattern_direction: PatternDirection
Pattern direction of stock piece.
price: usize
Price 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
sourceimpl Clone for StockPiece
impl Clone for StockPiece
sourcefn clone(&self) -> StockPiece
fn clone(&self) -> StockPiece
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StockPiece
impl Debug for StockPiece
sourceimpl Hash for StockPiece
impl Hash for StockPiece
sourceimpl PartialEq<StockPiece> for StockPiece
impl PartialEq<StockPiece> for StockPiece
sourcefn eq(&self, other: &StockPiece) -> bool
fn eq(&self, other: &StockPiece) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &StockPiece) -> bool
fn ne(&self, other: &StockPiece) -> bool
This method tests for !=
.
impl Copy for StockPiece
impl Eq for StockPiece
impl StructuralEq for StockPiece
impl StructuralPartialEq for StockPiece
Auto Trait Implementations
impl RefUnwindSafe for StockPiece
impl Send for StockPiece
impl Sync for StockPiece
impl Unpin for StockPiece
impl UnwindSafe for StockPiece
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more