pub struct NativeFunction {
pub name: String,
pub arity: u8,
pub function: NativeFn,
}
Expand description
Native (built-in) function representation
Fields§
§name: String
Name of the native function
arity: u8
Number of parameters
function: NativeFn
The Rust function that implements this native function
Trait Implementations§
Source§impl Clone for NativeFunction
impl Clone for NativeFunction
Source§fn clone(&self) -> NativeFunction
fn clone(&self) -> NativeFunction
Returns a copy 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 moreSource§impl Debug for NativeFunction
impl Debug for NativeFunction
Source§impl DeserializeFromReader for Box<NativeFunction>
impl DeserializeFromReader for Box<NativeFunction>
fn deserialize(reader: &mut dyn Read) -> Result<Self>
Source§impl DisplayValue for Box<NativeFunction>
impl DisplayValue for Box<NativeFunction>
fn display_value(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations§
impl Freeze for NativeFunction
impl RefUnwindSafe for NativeFunction
impl Send for NativeFunction
impl Sync for NativeFunction
impl Unpin for NativeFunction
impl UnwindSafe for NativeFunction
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