pub struct HostFn { /* private fields */ }Expand description
A host function: a native callback provided by the embedder, behind the Rc
a Value::HostFn carries.
It includes a name, arity, and code. The evaluator gathers arguments according
to arity before calling the function, making it strict and curried.
Ctx is passed to allow the callback to call Elly functions (apply_with)
using the same ID source, preventing identity collisions for minted closures.
Arity must be at least 1; zero-argument constants are supplied as values.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HostFn
impl !Send for HostFn
impl !Sync for HostFn
impl !UnwindSafe for HostFn
impl Freeze for HostFn
impl Unpin for HostFn
impl UnsafeUnpin for HostFn
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