[−][src]Struct qjs::Local
Methods
impl<'a> Local<'a, Value>
[src]
impl<'a> Local<'a, Value>
[src]
pub fn call<T: Args>(
&self,
this: Option<&Value>,
args: T
) -> Result<Local<Value>, Error>
[src]
&self,
this: Option<&Value>,
args: T
) -> Result<Local<Value>, Error>
pub fn invoke<N: NewAtom, T: Args>(
&self,
atom: N,
args: T
) -> Result<Local<Value>, Error>
[src]
&self,
atom: N,
args: T
) -> Result<Local<Value>, Error>
pub fn call_constructor<T: Args>(&self, args: T) -> Result<Local<Value>, Error>
[src]
pub fn call_constructor2<T: Args>(
&self,
new_target: Option<&Value>,
args: T
) -> Result<Local<Value>, Error>
[src]
&self,
new_target: Option<&Value>,
args: T
) -> Result<Local<Value>, Error>
impl<'a, T> Local<'a, T> where
T: Unbindable,
[src]
T: Unbindable,
pub fn into_inner(self) -> T
[src]
pub fn map<U, F>(self, f: F) -> Local<'a, U> where
F: FnOnce(T) -> U,
U: Unbindable,
[src]
F: FnOnce(T) -> U,
U: Unbindable,
impl<'_> Local<'_, Value>
[src]
impl<'a> Local<'a, Value>
[src]
pub fn keys(&self) -> Result<Option<Vec<Atom>>, Error>
[src]
Returns an array of a given object's own property names, in the same order as we get with a normal loop.
pub fn get_own_property_names(&self) -> Result<Option<Vec<Atom>>, Error>
[src]
Returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.
pub fn get_own_property_descriptor<T: NewAtom>(
&self,
prop: T
) -> Result<Option<Descriptor>, Error>
[src]
&self,
prop: T
) -> Result<Option<Descriptor>, Error>
Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.
pub fn get_property<T: GetProperty>(&self, prop: T) -> Option<Local<Value>>
[src]
Get a property value on an object.
pub fn set_property<T: SetProperty, V: NewValue>(
&self,
prop: T,
val: V
) -> Result<bool, Error>
[src]
&self,
prop: T,
val: V
) -> Result<bool, Error>
Set a property value on an object.
pub fn has_property<T: HasProperty>(&self, prop: T) -> Result<bool, Error>
[src]
Check if a property on an object.
pub fn delete_property<T: DeleteProperty>(&self, prop: T) -> Result<bool, Error>
[src]
Delete a property on an object.
It returns a bool
indicating whether or not the property was successfully deleted.
pub fn define_property<T: DefineProperty>(
&self,
prop: T,
val: Option<Value>,
getter: Option<&Value>,
setter: Option<&Value>,
flags: Prop
) -> Result<bool, Error>
[src]
&self,
prop: T,
val: Option<Value>,
getter: Option<&Value>,
setter: Option<&Value>,
flags: Prop
) -> Result<bool, Error>
Defines a new property directly on an object, or modifies an existing property on an object.
pub fn define_property_value<T: DefinePropertyValue, V: NewValue>(
&self,
prop: T,
val: V,
flags: Prop
) -> Result<bool, Error>
[src]
&self,
prop: T,
val: V,
flags: Prop
) -> Result<bool, Error>
Defines a new property with value directly on an object, or modifies an existing property on an object.
pub fn define_property_get_set<T: DefinePropertyGetSet>(
&self,
prop: T,
getter: Option<&Value>,
setter: Option<&Value>,
flags: Prop
) -> Result<bool, Error>
[src]
&self,
prop: T,
getter: Option<&Value>,
setter: Option<&Value>,
flags: Prop
) -> Result<bool, Error>
Defines a new property with getter and setter directly on an object, or modifies an existing property on an object.
pub fn is_extensible(&self) -> Result<bool, Error>
[src]
Check if an object is extensible (whether it can have new properties added to it).
pub fn prevent_extensions(&self) -> Result<bool, Error>
[src]
Prevents new properties from ever being added to an object (i.e. prevents future extensions to the object).
impl<'_> Local<'_, Value>
[src]
pub fn get_opaque<T>(&self, class_id: ClassId) -> *mut T
[src]
impl<'a> Local<'a, Value>
[src]
pub fn check_undefined(self) -> Option<Local<'a, Value>>
[src]
pub fn is_error(&self) -> bool
[src]
pub fn is_function(&self) -> bool
[src]
pub fn is_constructor(&self) -> bool
[src]
pub fn to_bool(&self) -> Option<bool>
[src]
pub fn to_int32(&self) -> Option<i32>
[src]
pub fn to_int64(&self) -> Option<i64>
[src]
pub fn to_index(&self) -> Option<u64>
[src]
pub fn to_float64(&self) -> Option<f64>
[src]
pub fn to_bigint64(&self) -> Option<i64>
[src]
pub fn to_str(&self) -> Local<Value>
[src]
pub fn to_property_key(&self) -> Local<Value>
[src]
pub fn to_cstring(&self) -> Option<CString>
[src]
pub fn instance_of(&self, obj: &Value) -> Result<bool, Error>
[src]
Trait Implementations
impl<'_> GetProperty for Local<'_, JSAtom>
[src]
fn get_property<'a>(
&self,
ctxt: &'a ContextRef,
this: &Value
) -> Option<Local<'a, Value>>
[src]
&self,
ctxt: &'a ContextRef,
this: &Value
) -> Option<Local<'a, Value>>
impl<'_> SetProperty for Local<'_, JSAtom>
[src]
fn set_property<T: NewValue>(
&self,
ctxt: &ContextRef,
this: &Value,
val: T
) -> Result<bool, Error>
[src]
&self,
ctxt: &ContextRef,
this: &Value,
val: T
) -> Result<bool, Error>
impl<'_> DefinePropertyValue for Local<'_, JSAtom>
[src]
fn define_property<T: NewValue>(
self,
ctxt: &ContextRef,
this: &Value,
val: T,
flags: Prop
) -> Result<bool, Error>
[src]
self,
ctxt: &ContextRef,
this: &Value,
val: T,
flags: Prop
) -> Result<bool, Error>
impl<'a> NewValue for Local<'a, Value>
[src]
fn new_value(self, _ctxt: &ContextRef) -> JSValue
[src]
impl<'a> NewValue for &'a Local<'a, Value>
[src]
fn new_value(self, ctxt: &ContextRef) -> JSValue
[src]
impl<'a, T> Drop for Local<'a, T> where
T: Unbindable,
[src]
T: Unbindable,
impl<'a> Into<Value> for Local<'a, Value>
[src]
impl<'a> Into<JSValue> for Local<'a, Value>
[src]
impl<'_, T: ExtractValue + PartialOrd> PartialOrd<T> for Local<'_, Value>
[src]
fn partial_cmp(&self, other: &T) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'_, T: ExtractValue + PartialEq> PartialEq<T> for Local<'_, Value>
[src]
fn eq(&self, other: &T) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'_> Clone for Local<'_, Value>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, T> DerefMut for Local<'a, T> where
T: Unbindable,
[src]
T: Unbindable,
impl<'a, T> Deref for Local<'a, T> where
T: Unbindable,
[src]
T: Unbindable,
impl<'_> Display for Local<'_, Value>
[src]
impl<'_> Debug for Local<'_, Value>
[src]
impl<'_> TryFrom<Local<'_, Value>> for ErrorKind
[src]
Auto Trait Implementations
impl<'a, T> !Send for Local<'a, T>
impl<'a, T> Unpin for Local<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> !Sync for Local<'a, T>
impl<'a, T> !UnwindSafe for Local<'a, T>
impl<'a, T> !RefUnwindSafe for Local<'a, T>
Blanket Implementations
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,