pub struct Executor { /* private fields */ }Expand description
Main code executor that dispatches to language-specific implementations
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn with_limits(limits: ExecutionLimits) -> Self
pub fn with_limits(limits: ExecutionLimits) -> Self
Create a new executor with custom limits
Sourcepub fn execute(&self, request: ExecutionRequest) -> ExecutionResult
pub fn execute(&self, request: ExecutionRequest) -> ExecutionResult
Execute code in the specified language
Sourcepub fn execute_str(&self, language: &str, code: &str) -> ExecutionResult
pub fn execute_str(&self, language: &str, code: &str) -> ExecutionResult
Execute code from a string, parsing the language
Sourcepub fn supported_languages(&self) -> Vec<Language>
pub fn supported_languages(&self) -> Vec<Language>
Get list of supported languages
Sourcepub fn is_supported(&self, language: Language) -> bool
pub fn is_supported(&self, language: Language) -> bool
Check if a language is supported
Sourcepub fn limits(&self) -> &ExecutionLimits
pub fn limits(&self) -> &ExecutionLimits
Get the current limits
Trait Implementations§
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more