pub struct Script(/* private fields */);Expand description
A compiled JavaScript script, tied to a Context which was active when the script was compiled.
Implementations§
Source§impl Script
impl Script
Sourcepub fn compile<'s>(
scope: &PinScope<'s, '_>,
source: Local<'_, String>,
origin: Option<&ScriptOrigin<'_>>,
) -> Option<Local<'s, Script>>
pub fn compile<'s>( scope: &PinScope<'s, '_>, source: Local<'_, String>, origin: Option<&ScriptOrigin<'_>>, ) -> Option<Local<'s, Script>>
A shorthand for ScriptCompiler::Compile().
Sourcepub fn get_unbound_script<'s>(
&self,
scope: &PinScope<'s, '_>,
) -> Local<'s, UnboundScript>
pub fn get_unbound_script<'s>( &self, scope: &PinScope<'s, '_>, ) -> Local<'s, UnboundScript>
Returns the corresponding context-unbound script.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Script
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin for Script
impl UnwindSafe for Script
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more