Struct rquickjs_core::Value
source · [−]pub struct Value<'js> { /* private fields */ }
Expand description
Any javascript value
Implementations
sourceimpl<'js> Value<'js>
impl<'js> Value<'js>
pub fn new_uninitialized(ctx: Ctx<'js>) -> Self
pub fn new_undefined(ctx: Ctx<'js>) -> Self
pub fn new_null(ctx: Ctx<'js>) -> Self
sourcepub fn new_number(ctx: Ctx<'js>, value: f64) -> Self
pub fn new_number(ctx: Ctx<'js>, value: f64) -> Self
Create a new number value
sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Check if the value is a function
sourceimpl<'js> Value<'js>
impl<'js> Value<'js>
sourcepub unsafe fn ref_string(&self) -> &String<'js>
pub unsafe fn ref_string(&self) -> &String<'js>
sourcepub fn into_string(self) -> Option<String<'js>>
pub fn into_string(self) -> Option<String<'js>>
Try convert into
sourcepub fn from_string(value: String<'js>) -> Self
pub fn from_string(value: String<'js>) -> Self
Convert from
sourceimpl<'js> Value<'js>
impl<'js> Value<'js>
sourcepub unsafe fn ref_symbol(&self) -> &Symbol<'js>
pub unsafe fn ref_symbol(&self) -> &Symbol<'js>
sourcepub fn into_symbol(self) -> Option<Symbol<'js>>
pub fn into_symbol(self) -> Option<Symbol<'js>>
Try convert into
sourcepub fn from_symbol(value: Symbol<'js>) -> Self
pub fn from_symbol(value: Symbol<'js>) -> Self
Convert from
sourceimpl<'js> Value<'js>
impl<'js> Value<'js>
sourcepub unsafe fn ref_object(&self) -> &Object<'js>
pub unsafe fn ref_object(&self) -> &Object<'js>
sourcepub fn into_object(self) -> Option<Object<'js>>
pub fn into_object(self) -> Option<Object<'js>>
Try convert into
sourcepub fn from_object(value: Object<'js>) -> Self
pub fn from_object(value: Object<'js>) -> Self
Convert from
sourceimpl<'js> Value<'js>
impl<'js> Value<'js>
sourcepub fn into_array(self) -> Option<Array<'js>>
pub fn into_array(self) -> Option<Array<'js>>
Try convert into
sourcepub fn from_array(value: Array<'js>) -> Self
pub fn from_array(value: Array<'js>) -> Self
Convert from
sourceimpl<'js> Value<'js>
impl<'js> Value<'js>
sourcepub unsafe fn ref_function(&self) -> &Function<'js>
pub unsafe fn ref_function(&self) -> &Function<'js>
sourcepub fn as_function(&self) -> Option<&Function<'js>>
pub fn as_function(&self) -> Option<&Function<'js>>
Try reinterprete as
sourcepub fn into_function(self) -> Option<Function<'js>>
pub fn into_function(self) -> Option<Function<'js>>
Try convert into
sourcepub fn from_function(value: Function<'js>) -> Self
pub fn from_function(value: Function<'js>) -> Self
Convert from
sourceimpl<'js> Value<'js>
impl<'js> Value<'js>
sourcepub unsafe fn ref_module(&self) -> &Module<'js, Evaluated>
pub unsafe fn ref_module(&self) -> &Module<'js, Evaluated>
sourcepub fn into_module(self) -> Option<Module<'js, Evaluated>>
pub fn into_module(self) -> Option<Module<'js, Evaluated>>
Try convert into
sourcepub fn from_module(value: Module<'js, Evaluated>) -> Self
pub fn from_module(value: Module<'js, Evaluated>) -> Self
Convert from
Trait Implementations
sourceimpl<'js> AsRef<Value<'js>> for ArrayBuffer<'js>
impl<'js> AsRef<Value<'js>> for ArrayBuffer<'js>
sourceimpl<'js, T> AsRef<Value<'js>> for TypedArray<'js, T>
impl<'js, T> AsRef<Value<'js>> for TypedArray<'js, T>
Auto Trait Implementations
impl<'js> !RefUnwindSafe for Value<'js>
impl<'js> !Send for Value<'js>
impl<'js> !Sync for Value<'js>
impl<'js> Unpin for Value<'js>
impl<'js> UnwindSafe for Value<'js>
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