pub struct Executor { /* private fields */ }Implementations§
Source§impl Executor
impl Executor
pub fn from_bytes( config: ExecutorConfig, bytes: &[u8], ) -> Result<Self, RuntimeError>
pub fn from_bytecode( config: ExecutorConfig, program: BytecodeProgram, ) -> Result<Self, RuntimeError>
Sourcepub fn from_program(
config: ExecutorConfig,
program: Arc<BytecodeProgram>,
) -> Result<Self, RuntimeError>
pub fn from_program( config: ExecutorConfig, program: Arc<BytecodeProgram>, ) -> Result<Self, RuntimeError>
Construct an executor sharing a pre-built Arc<BytecodeProgram>.
Prefer this over Executor::from_bytecode when a single compiled
script is run against many targets: the program (and the regex caches
derived from it) are cloned via Arc rather than deep-copied.
pub fn bytecode(&self) -> &BytecodeProgram
pub async fn run(&self) -> Result<ExecutionResult, RuntimeError>
Auto Trait Implementations§
impl Freeze for Executor
impl !RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
impl !UnwindSafe for Executor
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