pub struct KNativeFunction {
pub function: Ptr<dyn KotoFunction>,
}
Expand description
An function that’s defined outside of the Koto runtime
Fields§
§function: Ptr<dyn KotoFunction>
The function implementation that should be called when calling the external function
Implementations§
Source§impl KNativeFunction
impl KNativeFunction
Sourcepub fn new(function: impl KotoFunction) -> Self
pub fn new(function: impl KotoFunction) -> Self
Creates a new external function
Trait Implementations§
Source§impl Clone for KNativeFunction
impl Clone for KNativeFunction
Source§impl Debug for KNativeFunction
impl Debug for KNativeFunction
Source§impl From<KNativeFunction> for KValue
impl From<KNativeFunction> for KValue
Source§fn from(value: KNativeFunction) -> Self
fn from(value: KNativeFunction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KNativeFunction
impl !RefUnwindSafe for KNativeFunction
impl !Send for KNativeFunction
impl !Sync for KNativeFunction
impl Unpin for KNativeFunction
impl !UnwindSafe for KNativeFunction
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