pub enum VariableType {
Boolean,
NonNegativeReal(f64, f64),
Real(f64, f64),
IntegerRange(i32, i32),
}Expand description
Represents the final, resolved type of a variable after being compiled
Variants§
Boolean
Boolean variable (0 or 1)
NonNegativeReal(f64, f64)
Real number greater than or equal to zero
Real(f64, f64)
Any real number
IntegerRange(i32, i32)
Integer within a specified range [min, max]
Implementations§
Source§impl VariableType
impl VariableType
pub fn non_negative_real() -> VariableType
pub fn real() -> VariableType
pub fn bool() -> VariableType
pub fn integer_range(min: i32, max: i32) -> VariableType
Sourcepub fn kinds_to_string() -> Vec<String>
pub fn kinds_to_string() -> Vec<String>
Returns a list of all available variable type names as strings
Trait Implementations§
Source§impl Clone for VariableType
impl Clone for VariableType
Source§fn clone(&self) -> VariableType
fn clone(&self) -> VariableType
Returns a copy 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 VariableType
impl Debug for VariableType
Source§impl Display for VariableType
impl Display for VariableType
Source§impl PartialEq for VariableType
impl PartialEq for VariableType
Source§impl Serialize for VariableType
impl Serialize for VariableType
impl Copy for VariableType
impl StructuralPartialEq for VariableType
Auto Trait Implementations§
impl Freeze for VariableType
impl RefUnwindSafe for VariableType
impl Send for VariableType
impl Sync for VariableType
impl Unpin for VariableType
impl UnwindSafe for VariableType
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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