pub enum ConstValue {
Int(BigInt),
Float(f64),
}Expand description
The value of a constant: an integer or a double.
Rust integers, bool, BigInt, f32 and f64 convert into one, so make_const takes
them directly.
Variants§
Trait Implementations§
Source§impl Clone for ConstValue
impl Clone for ConstValue
Source§fn clone(&self) -> ConstValue
fn clone(&self) -> ConstValue
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 moreSource§impl Debug for ConstValue
impl Debug for ConstValue
Source§impl From<BigInt> for ConstValue
impl From<BigInt> for ConstValue
Source§impl From<bool> for ConstValue
impl From<bool> for ConstValue
Source§impl From<f32> for ConstValue
impl From<f32> for ConstValue
Source§impl From<f64> for ConstValue
impl From<f64> for ConstValue
Source§impl From<i16> for ConstValue
impl From<i16> for ConstValue
Source§impl From<i32> for ConstValue
impl From<i32> for ConstValue
Source§impl From<i64> for ConstValue
impl From<i64> for ConstValue
Source§impl From<i8> for ConstValue
impl From<i8> for ConstValue
Source§impl From<u16> for ConstValue
impl From<u16> for ConstValue
Source§impl From<u32> for ConstValue
impl From<u32> for ConstValue
Source§impl From<u64> for ConstValue
impl From<u64> for ConstValue
Auto Trait Implementations§
impl Freeze for ConstValue
impl RefUnwindSafe for ConstValue
impl Send for ConstValue
impl Sync for ConstValue
impl Unpin for ConstValue
impl UnsafeUnpin for ConstValue
impl UnwindSafe for ConstValue
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