pub struct NativeFunction {
pub name: String,
pub func: Box<dyn Function>,
}Expand description
NativeFunction
Fields§
§name: String§func: Box<dyn Function>Implementations§
Trait Implementations§
Source§impl Debug for NativeFunction
impl Debug for NativeFunction
Source§impl Object for NativeFunction
impl Object for NativeFunction
fn call(&mut self, args: &[ValueRef]) -> Result<Option<Value>, RuntimeError>
fn debug(&self, f: &mut Formatter<'_>) -> Result
Source§fn mul(&self, other: &Value) -> Result<Value, RuntimeError>
fn mul(&self, other: &Value) -> Result<Value, RuntimeError>
arithmetic multiplication operation
fn index_set( &mut self, index: &Value, value: ValueRef, ) -> Result<(), RuntimeError>
fn property_get(&self, member: &str) -> Result<ValueRef, RuntimeError>
fn property_set( &mut self, member: &str, value: ValueRef, ) -> Result<(), RuntimeError>
fn property_call( &mut self, member: &str, args: &[ValueRef], ) -> Result<Option<Value>, RuntimeError>
fn make_iterator( &self, ) -> Result<Box<dyn Iterator<Item = ValueRef>>, RuntimeError>
fn iterator_has_next(&self) -> Result<bool, RuntimeError>
fn iterate_next(&mut self) -> Result<ValueRef, RuntimeError>
fn make_slice(&self, range: ValueRef) -> Result<Value, RuntimeError>
fn into_future( self: Box<Self>, ) -> Result<Box<dyn Future<Output = Value> + Unpin + Send + 'static>, RuntimeError>
Auto Trait Implementations§
impl !RefUnwindSafe for NativeFunction
impl !Sync for NativeFunction
impl !UnwindSafe for NativeFunction
impl Freeze for NativeFunction
impl Send for NativeFunction
impl Unpin for NativeFunction
impl UnsafeUnpin 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