Struct janetrs::JanetFunction [−][src]
#[repr(transparent)]pub struct JanetFunction<'data> { /* fields omitted */ }
Expand description
A representation of a Janet function defined at the Janet side.
Implementations
Create a new JanetFunction with a raw pointer.
Safety
This function do not check if the given raw is NULL or not. Use at your
own risk.
Execute the JanetFunction with the given arguments.
This function may trigger a GC collection.
If the executions was successful returns the output, otherwise return the
CallError with information returned by the call.
pub fn call_with_fiber<'fiber>(
&mut self,
fiber: JanetFiber<'fiber>,
args: impl AsRef<[Janet]>
) -> Result<Janet, CallError<'fiber>>[src]
pub fn call_with_fiber<'fiber>(
&mut self,
fiber: JanetFiber<'fiber>,
args: impl AsRef<[Janet]>
) -> Result<Janet, CallError<'fiber>>[src]Execute the JanetFunction with the given arguments wising the given fiber.
This function may trigger the a GC collection.
If the executions was successful returns the output, otherwise return the
CallError with information returned by the call.
Execute the JanetFunction with the given arguments.
This function can not trigger GC collection.
Janet Panics
Panics if anything goes wrong trying to call the function.
Return a raw pointer to the function raw structure.
The caller must ensure that the function outlives the pointer this function returns, or else it will end up pointing to garbage.
Return a raw mutable pointer to the function raw structure.
The caller must ensure that the function outlives the pointer this function returns, or else it will end up pointing to garbage.
Trait Implementations
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl<'data> RefUnwindSafe for JanetFunction<'data>impl<'data> !Send for JanetFunction<'data>impl<'data> !Sync for JanetFunction<'data>impl<'data> Unpin for JanetFunction<'data>impl<'data> UnwindSafe for JanetFunction<'data>