pub struct UntypedFuncCall<'source> { /* private fields */ }
Expand description
An UntypedFuncCall is a parsed but not type-checked WAVE function call.
WAVE function calls have the form <name>(<params...>)
.
Implementations§
Source§impl<'source> UntypedFuncCall<'source>
impl<'source> UntypedFuncCall<'source>
Sourcepub fn parse(source: &'source str) -> Result<Self, ParserError>
pub fn parse(source: &'source str) -> Result<Self, ParserError>
Parses an untyped function call from WAVE.
Sourcepub fn into_owned(self) -> UntypedFuncCall<'static>
pub fn into_owned(self) -> UntypedFuncCall<'static>
Creates an owned function call, copying the entire source string if necessary.
Sourcepub fn params_node(&self) -> Option<&Node>
pub fn params_node(&self) -> Option<&Node>
Returns the function parameters node.
Returns None
if the function call has no parameters.
Sourcepub fn to_wasm_params<'types, V: WasmValue + 'static>(
&self,
types: impl IntoIterator<Item = &'types V::Type>,
) -> Result<Vec<V>, ParserError>
pub fn to_wasm_params<'types, V: WasmValue + 'static>( &self, types: impl IntoIterator<Item = &'types V::Type>, ) -> Result<Vec<V>, ParserError>
Converts the untyped parameters into the given types.
Any number of trailing option-typed values may be omitted; those will
be returned as none
values.
Trait Implementations§
Auto Trait Implementations§
impl<'source> Freeze for UntypedFuncCall<'source>
impl<'source> RefUnwindSafe for UntypedFuncCall<'source>
impl<'source> Send for UntypedFuncCall<'source>
impl<'source> Sync for UntypedFuncCall<'source>
impl<'source> Unpin for UntypedFuncCall<'source>
impl<'source> UnwindSafe for UntypedFuncCall<'source>
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