pub struct UserConstant {
pub weight: u32,
pub name: String,
pub description: String,
pub value: f64,
pub num_type: NumType,
}Expand description
A user-defined constant
Fields§
§weight: u32Weight (complexity) of this constant
This field is part of the public API and is used when generating expressions that include user-defined constants.
name: StringShort name (single character)
description: StringDescription (for display)
This field is part of the public API for documentation and display purposes.
value: f64Numeric value
num_type: NumTypeNumeric type classification
Trait Implementations§
Source§impl Clone for UserConstant
impl Clone for UserConstant
Source§fn clone(&self) -> UserConstant
fn clone(&self) -> UserConstant
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 UserConstant
impl RefUnwindSafe for UserConstant
impl Send for UserConstant
impl Sync for UserConstant
impl Unpin for UserConstant
impl UnsafeUnpin for UserConstant
impl UnwindSafe for UserConstant
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