pub struct EquationVariable {
pub symbol: String,
pub name: String,
pub units: String,
pub description: String,
pub constraints: Option<VariableConstraints>,
}Expand description
A variable in a governing equation with its metadata.
Fields§
§symbol: StringSymbol used in the equation (e.g., “λ”, “L”, “W”)
name: StringHuman-readable name
units: StringPhysical units (e.g., “items/time”, “seconds”)
description: StringDescription of what this variable represents
constraints: Option<VariableConstraints>Valid range constraints
Implementations§
Source§impl EquationVariable
impl EquationVariable
Sourcepub fn with_description(self, desc: &str) -> Self
pub fn with_description(self, desc: &str) -> Self
Add a description.
Sourcepub fn with_constraints(self, constraints: VariableConstraints) -> Self
pub fn with_constraints(self, constraints: VariableConstraints) -> Self
Add constraints.
Trait Implementations§
Source§impl Clone for EquationVariable
impl Clone for EquationVariable
Source§fn clone(&self) -> EquationVariable
fn clone(&self) -> EquationVariable
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 moreAuto Trait Implementations§
impl Freeze for EquationVariable
impl RefUnwindSafe for EquationVariable
impl Send for EquationVariable
impl Sync for EquationVariable
impl Unpin for EquationVariable
impl UnsafeUnpin for EquationVariable
impl UnwindSafe for EquationVariable
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