Enum sljs::object::ObjectValue
source · [−]pub enum ObjectValue {
None,
Boolean(bool),
Number(JSNumber),
String(JSString),
HostFn(HostFunc),
Closure(Closure),
Array(JSArray),
}
Expand description
ObjectValue
is used:
- as the primitive value of a
Number
/Boolean
/String
object; - as the function entry in a
Function
. - as optimizied storage in an
Array
Variants
None
Boolean(bool)
Number(JSNumber)
String(JSString)
HostFn(HostFunc)
Closure(Closure)
Array(JSArray)
Implementations
sourceimpl ObjectValue
impl ObjectValue
pub fn from_func(func: HostFn) -> ObjectValue
Trait Implementations
sourceimpl Clone for ObjectValue
impl Clone for ObjectValue
sourcefn clone(&self) -> ObjectValue
fn clone(&self) -> ObjectValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ObjectValue
impl !Send for ObjectValue
impl !Sync for ObjectValue
impl Unpin for ObjectValue
impl UnwindSafe for ObjectValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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