pub enum FnExt {
Void(fn(_: &mut Runtime) -> Result<(), String>),
Return(fn(_: &mut Runtime) -> Result<Variable, String>),
BinOp(fn(_: &Variable, _: &Variable) -> Result<Variable, String>),
UnOp(fn(_: &Variable) -> Result<Variable, String>),
}
Expand description
Refers to an external function.
Variants§
Void(fn(_: &mut Runtime) -> Result<(), String>)
External function with no return value.
Return(fn(_: &mut Runtime) -> Result<Variable, String>)
External function with return value.
BinOp(fn(_: &Variable, _: &Variable) -> Result<Variable, String>)
External binary operator.
UnOp(fn(_: &Variable) -> Result<Variable, String>)
External unary operator.
Trait Implementations§
impl Copy for FnExt
Auto Trait Implementations§
impl RefUnwindSafe for FnExt
impl Send for FnExt
impl Sync for FnExt
impl Unpin for FnExt
impl UnwindSafe for FnExt
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