pub struct NativeFunction { /* private fields */ }
Implementations§
Source§impl NativeFunction
impl NativeFunction
pub fn new<S, AS, D, B>(name: S, argspec: AS, doc: D, body: B) -> Self
pub fn name(&self) -> &RcStr
pub fn argspec(&self) -> &ArgSpec
pub fn doc(&self) -> &Option<RcStr>
pub fn apply( &self, globals: &mut Globals, args: Vec<Value>, kwargs: Option<HashMap<RcStr, Value>>, ) -> Result<Value>
Trait Implementations§
Source§impl Debug for NativeFunction
impl Debug for NativeFunction
Source§impl From<NativeFunction> for Value
impl From<NativeFunction> for Value
Source§fn from(f: NativeFunction) -> Self
fn from(f: NativeFunction) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NativeFunction
impl PartialEq for NativeFunction
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