pub enum HostRegistration<P: ProcessManager> {
Stateful {
name: String,
meta: FuncMeta,
func: NativeFn<P>,
},
Pure {
name: String,
meta: FuncMeta,
func: PureFn,
},
}Expand description
One host-registered function, grouped into a HostModule and passed
to Engine::register_module. Build the entry with the #[oxdock_func]-
generated registration marker, or by hand. Pure entries run
on both the AST and the compiled RPN math paths; Stateful entries run
on the AST path with full step context.
Variants§
Implementations§
Source§impl<P: ProcessManager> HostRegistration<P>
impl<P: ProcessManager> HostRegistration<P>
Trait Implementations§
Source§impl<P: ProcessManager> Clone for HostRegistration<P>
impl<P: ProcessManager> Clone for HostRegistration<P>
Auto Trait Implementations§
impl<P> !RefUnwindSafe for HostRegistration<P>
impl<P> !UnwindSafe for HostRegistration<P>
impl<P> Freeze for HostRegistration<P>
impl<P> Send for HostRegistration<P>
impl<P> Sync for HostRegistration<P>
impl<P> Unpin for HostRegistration<P>
impl<P> UnsafeUnpin for HostRegistration<P>
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