pub struct Stock1D {
pub name: String,
pub length: u32,
pub kerf: u32,
pub trim: u32,
pub cost: f64,
pub available: Option<usize>,
}Expand description
A linear stock entry that demands can be cut from.
Fields§
§name: StringHuman-readable identifier for this stock type.
length: u32Raw length of the stock before any trim is removed.
kerf: u32Material lost to the saw between adjacent cuts.
trim: u32Unusable material removed from the stock length before packing.
cost: f64Per-unit cost of consuming a piece of this stock type.
available: Option<usize>Optional cap on the number of pieces of this stock type that may be used.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stock1D
impl<'de> Deserialize<'de> for Stock1D
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
impl StructuralPartialEq for Stock1D
Auto Trait Implementations§
impl Freeze for Stock1D
impl RefUnwindSafe for Stock1D
impl Send for Stock1D
impl Sync for Stock1D
impl Unpin for Stock1D
impl UnsafeUnpin for Stock1D
impl UnwindSafe for Stock1D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more