Struct opslang_wasm::ParsedCode
source · pub struct ParsedCode { /* private fields */ }
Implementations§
source§impl ParsedCode
impl ParsedCode
pub fn from_code(code: &str) -> Result<ParsedCode, JsValue>
pub async fn execute_line( &self, driver: Driver, context: Option<StatementExecutionContext>, stop_on_break: bool, line_num: usize, current_time_ms: usize ) -> Result<ExecutionResult, String>
pub fn free_variables(&self, line_num: usize) -> Result<Variables, String>
Trait Implementations§
source§impl From<ParsedCode> for JsValue
impl From<ParsedCode> for JsValue
source§fn from(value: ParsedCode) -> Self
fn from(value: ParsedCode) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for ParsedCode
impl FromWasmAbi for ParsedCode
source§impl IntoWasmAbi for ParsedCode
impl IntoWasmAbi for ParsedCode
source§impl LongRefFromWasmAbi for ParsedCode
impl LongRefFromWasmAbi for ParsedCode
source§impl OptionFromWasmAbi for ParsedCode
impl OptionFromWasmAbi for ParsedCode
source§impl OptionIntoWasmAbi for ParsedCode
impl OptionIntoWasmAbi for ParsedCode
source§impl RefFromWasmAbi for ParsedCode
impl RefFromWasmAbi for ParsedCode
§type Anchor = Ref<'static, ParsedCode>
type Anchor = Ref<'static, ParsedCode>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for ParsedCode
impl RefMutFromWasmAbi for ParsedCode
source§impl TryFromJsValue for ParsedCode
impl TryFromJsValue for ParsedCode
source§impl VectorFromWasmAbi for ParsedCode
impl VectorFromWasmAbi for ParsedCode
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ParsedCode]>
source§impl VectorIntoWasmAbi for ParsedCode
impl VectorIntoWasmAbi for ParsedCode
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ParsedCode]>) -> Self::Abi
source§impl WasmDescribeVector for ParsedCode
impl WasmDescribeVector for ParsedCode
Auto Trait Implementations§
impl Freeze for ParsedCode
impl RefUnwindSafe for ParsedCode
impl Send for ParsedCode
impl Sync for ParsedCode
impl Unpin for ParsedCode
impl UnwindSafe for ParsedCode
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.