pub enum HostRegistration<P>where
P: ProcessManager,{
Stateful {
name: String,
meta: FuncMeta,
func: Arc<dyn Fn(&mut StepCtx<'_, P>, Vec<Value>) -> Result<Value, Error> + Sync + Send>,
},
Pure {
name: String,
meta: FuncMeta,
func: Arc<dyn Fn(Vec<Value>) -> Result<Value, Error> + Sync + Send>,
},
}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> HostRegistration<P>where
P: ProcessManager,
impl<P> HostRegistration<P>where
P: ProcessManager,
Trait Implementations§
Source§impl<P> Clone for HostRegistration<P>where
P: ProcessManager,
impl<P> Clone for HostRegistration<P>where
P: ProcessManager,
Source§fn clone(&self) -> HostRegistration<P>
fn clone(&self) -> HostRegistration<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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