pub struct ScriptFunction<'a, SE: ScriptExpression> {
pub signature: ScriptFunctionSignature<'a>,
pub script: ScriptHandle<'a, SE>,
}Expand description
A function a frontend produced: an unresolved signature and its operations.
Fields§
§signature: ScriptFunctionSignature<'a>Signature, with its types still unresolved.
script: ScriptHandle<'a, SE>Operations that make up the body.
Implementations§
Source§impl<SE: ScriptExpression> ScriptFunction<'static, SE>
impl<SE: ScriptExpression> ScriptFunction<'static, SE>
Sourcepub fn install<SFG: ScriptFunctionGenerator<SE>>(
&self,
registry: &mut Registry,
input: SFG::Input,
) -> Option<SFG::Output>
pub fn install<SFG: ScriptFunctionGenerator<SE>>( &self, registry: &mut Registry, input: SFG::Input, ) -> Option<SFG::Output>
Turns this into a real function with the given backend and registers it.
Returns whatever the backend produced alongside the function, or
None when the backend declined.
Trait Implementations§
Auto Trait Implementations§
impl<'a, SE> Freeze for ScriptFunction<'a, SE>
impl<'a, SE> RefUnwindSafe for ScriptFunction<'a, SE>
impl<'a, SE> Send for ScriptFunction<'a, SE>
impl<'a, SE> Sync for ScriptFunction<'a, SE>
impl<'a, SE> Unpin for ScriptFunction<'a, SE>
impl<'a, SE> UnsafeUnpin for ScriptFunction<'a, SE>
impl<'a, SE> UnwindSafe for ScriptFunction<'a, SE>
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