pub enum RantFunctionInterface {
Foreign(Rc<dyn Fn(&mut VM<'_>, Vec<RantValue>) -> Result<(), RuntimeError> + 'static>),
User(Rc<Sequence>),
}
Expand description
Defines endpoint variants for Rant functions.
Variants§
Foreign(Rc<dyn Fn(&mut VM<'_>, Vec<RantValue>) -> Result<(), RuntimeError> + 'static>)
Represents a foreign function as a wrapper function accepting a variable number of arguments.
User(Rc<Sequence>)
Represents a user function as an RST.
Trait Implementations§
Source§impl Clone for RantFunctionInterface
impl Clone for RantFunctionInterface
Source§fn clone(&self) -> RantFunctionInterface
fn clone(&self) -> RantFunctionInterface
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for RantFunctionInterface
impl !RefUnwindSafe for RantFunctionInterface
impl !Send for RantFunctionInterface
impl !Sync for RantFunctionInterface
impl Unpin for RantFunctionInterface
impl !UnwindSafe for RantFunctionInterface
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