[−][src]Enum runestick::ConstValue
A constant value.
Variants
A constant unit.
Byte(u8)
A byte.
Char(char)
A character.
Bool(bool)
A boolean constant value.
Integer(i64)
An integer constant.
Float(f64)
An float constant.
String(String)
A string constant designated by its slot.
Bytes(Bytes)
A byte string.
Vec(Vec<ConstValue>)
A vector of values.
Tuple(Box<[ConstValue]>)
An anonymous tuple.
Object(HashMap<String, ConstValue>)
An anonymous object.
Implementations
impl ConstValue
[src]
pub fn from_value(value: Value) -> Result<Self, VmError>
[src]
Convert a value into a constant value.
pub fn into_value(self) -> Value
[src]
Convert into VM value.
pub fn into_bool(self) -> Result<bool, Self>
[src]
Try to coerce into boolean.
pub fn type_info(&self) -> TypeInfo
[src]
Get the type information of the value.
Trait Implementations
impl Clone for ConstValue
[src]
fn clone(&self) -> ConstValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ConstValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConstValue
impl Send for ConstValue
impl Sync for ConstValue
impl Unpin for ConstValue
impl UnwindSafe for ConstValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,