pub struct Constant { /* private fields */ }
Expand description
Stores a constant’s name and value. There are three types of constants:
- Scalar: 123
- Vector: [1, 2, 3]
- Matrix: [[1, 2, 3], [4, 5, 6]]
Implementations§
Source§impl Constant
impl Constant
Sourcepub fn new(name: Identifier, value: ConstantType) -> Self
pub fn new(name: Identifier, value: ConstantType) -> Self
Returns a new instance of a Constant
Sourcepub fn name(&self) -> &Identifier
pub fn name(&self) -> &Identifier
Returns the name of the Constant
Sourcepub fn value(&self) -> &ConstantType
pub fn value(&self) -> &ConstantType
Returns the value of the Constant
Trait Implementations§
impl Eq for Constant
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnwindSafe for Constant
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