pub enum Value {
Nil,
False,
True,
Number(f64),
String(Gc<String>),
Function(Hidden<Closure>),
Struct(Hidden<Struct>),
Trait(Hidden<Trait>),
List(Hidden<List>),
Dict(Hidden<Dict>),
UserData(Gc<Box<dyn UserData>>),
}
Expand description
A dynamically typed value.
Variants
Nil
False
True
Number(f64)
String(Gc<String>)
Function(Hidden<Closure>)
Struct(Hidden<Struct>)
Trait(Hidden<Trait>)
List(Hidden<List>)
Dict(Hidden<Dict>)
UserData(Gc<Box<dyn UserData>>)
Implementations
Trait Implementations
sourceimpl From<i64> for Value
impl From<i64> for Value
NOTE: This is a lossy conversion, as an f64
cannot represent the entire range of an i64
.
sourceimpl From<isize> for Value
impl From<isize> for Value
NOTE: This is a lossy conversion, as an f64
cannot represent the entire range of an isize
.
sourceimpl From<u64> for Value
impl From<u64> for Value
NOTE: This is a lossy conversion, as an f64
cannot represent the entire range of a u64
.
sourceimpl From<usize> for Value
impl From<usize> for Value
NOTE: This is a lossy conversion, as an f64
cannot represent the entire range of a usize
.
sourceimpl TryFromValue for Value
impl TryFromValue for Value
fn try_from_value(value: &Value) -> Result<Self, Error>
Auto Trait Implementations
impl !RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more