Struct v8::UnboundScript
source · [−]#[repr(C)]pub struct UnboundScript(_);
Expand description
A compiled JavaScript script, not yet tied to a Context.
Implementations
sourceimpl UnboundScript
impl UnboundScript
sourcepub fn bind_to_current_context<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Local<'s, Script>
pub fn bind_to_current_context<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Local<'s, Script>
Binds the script to the currently entered context.
sourcepub fn create_code_cache(&self) -> Option<UniqueRef<CachedData<'static>>>
pub fn create_code_cache(&self) -> Option<UniqueRef<CachedData<'static>>>
Creates and returns code cache for the specified unbound_script. This will return nullptr if the script cannot be serialized. The CachedData returned by this function should be owned by the caller.
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 UnboundScript
impl Debug for UnboundScript
sourceimpl Deref for UnboundScript
impl Deref for UnboundScript
sourceimpl Hash for UnboundScript
impl Hash for UnboundScript
sourceimpl<'s> PartialEq<Data> for UnboundScript
impl<'s> PartialEq<Data> for UnboundScript
sourceimpl<'s> PartialEq<UnboundScript> for Data
impl<'s> PartialEq<UnboundScript> for Data
sourceimpl<'s> PartialEq<UnboundScript> for UnboundScript
impl<'s> PartialEq<UnboundScript> for UnboundScript
impl Eq for UnboundScript
Auto Trait Implementations
impl RefUnwindSafe for UnboundScript
impl Send for UnboundScript
impl Sync for UnboundScript
impl Unpin for UnboundScript
impl UnwindSafe for UnboundScript
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more