pub struct Function { /* private fields */ }
Expand description
Implementations§
Source§impl Function
impl Function
Sourcepub fn func(
&self,
) -> fn(&[Value], &mut Environment<'_, '_, '_>) -> Result<Value>
pub fn func( &self, ) -> fn(&[Value], &mut Environment<'_, '_, '_>) -> Result<Value>
Gets the function pointer associated with self
.
Sourcepub fn run(
&self,
args: &[Value],
env: &mut Environment<'_, '_, '_>,
) -> Result<Value>
pub fn run( &self, args: &[Value], env: &mut Environment<'_, '_, '_>, ) -> Result<Value>
Executes this function with the given arguments
Trait Implementations§
Source§impl PartialEq for Function
impl PartialEq for Function
impl Copy for Function
impl Eq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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