Struct v8::PrimitiveArray
source · [−]#[repr(C)]pub struct PrimitiveArray(_);
Expand description
An array to hold Primitive values. This is used by the embedder to pass host defined options to the ScriptOptions during compilation.
This is passed back to the embedder as part of HostImportModuleDynamicallyCallback for module loading.
Implementations
sourceimpl PrimitiveArray
impl PrimitiveArray
pub fn new<'s>(
scope: &mut HandleScope<'s>,
length: usize
) -> Local<'s, PrimitiveArray>
pub fn length(&self) -> usize
pub fn set<'s>(
&self,
scope: &mut HandleScope<'s>,
index: usize,
item: Local<'_, Primitive>
)
pub fn get<'s>(
&self,
scope: &mut HandleScope<'s>,
index: usize
) -> Local<'s, Primitive>
Methods from Deref<Target = Data>
sourcepub fn get_hash(&self) -> int
pub fn get_hash(&self) -> int
Returns the V8 hash value for this value. The current implementation uses a hidden property to store the identity hash on some object types.
The return value will never be 0. Also, it is not guaranteed to be unique.
sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true if this data is a Private
.
sourcepub fn is_object_template(&self) -> bool
pub fn is_object_template(&self) -> bool
Returns true if this data is an ObjectTemplate
sourcepub fn is_function_template(&self) -> bool
pub fn is_function_template(&self) -> bool
Returns true if this data is a FunctionTemplate.
Trait Implementations
sourceimpl Debug for PrimitiveArray
impl Debug for PrimitiveArray
sourceimpl Deref for PrimitiveArray
impl Deref for PrimitiveArray
sourceimpl Hash for PrimitiveArray
impl Hash for PrimitiveArray
sourceimpl<'s> PartialEq<Data> for PrimitiveArray
impl<'s> PartialEq<Data> for PrimitiveArray
sourceimpl<'s> PartialEq<PrimitiveArray> for Data
impl<'s> PartialEq<PrimitiveArray> for Data
sourceimpl<'s> PartialEq<PrimitiveArray> for PrimitiveArray
impl<'s> PartialEq<PrimitiveArray> for PrimitiveArray
impl Eq for PrimitiveArray
Auto Trait Implementations
impl RefUnwindSafe for PrimitiveArray
impl Send for PrimitiveArray
impl Sync for PrimitiveArray
impl Unpin for PrimitiveArray
impl UnwindSafe for PrimitiveArray
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