[−][src]Struct runestick::FnPtr
A stored function, of some specific kind.
Implementations
impl FnPtr
[src]
pub fn from_handler(
handler: Arc<dyn Fn(&mut Stack, usize) -> Result<(), VmError> + Sync>
) -> Self
[src]
handler: Arc<dyn Fn(&mut Stack, usize) -> Result<(), VmError> + Sync>
) -> Self
Create a function pointer from a handler.
pub fn from_offset(
context: Rc<Context>,
unit: Rc<Unit>,
offset: usize,
call: UnitFnCall,
args: usize
) -> Self
[src]
context: Rc<Context>,
unit: Rc<Unit>,
offset: usize,
call: UnitFnCall,
args: usize
) -> Self
Create a function pointer from an offset.
pub fn from_closure(
context: Rc<Context>,
unit: Rc<Unit>,
environment: Shared<Tuple>,
offset: usize,
call: UnitFnCall,
args: usize
) -> Self
[src]
context: Rc<Context>,
unit: Rc<Unit>,
environment: Shared<Tuple>,
offset: usize,
call: UnitFnCall,
args: usize
) -> Self
Create a function pointer from an offset.
pub fn from_tuple(hash: Hash, args: usize) -> Self
[src]
Create a function pointer from an offset.
pub fn from_variant_tuple(enum_hash: Hash, hash: Hash, args: usize) -> Self
[src]
Create a function pointer that constructs a tuple variant.
pub async fn call<A, T, '_>(&'_ self, args: A) -> Result<T, VmError> where
A: IntoArgs,
T: FromValue,
[src]
A: IntoArgs,
T: FromValue,
Perform a call over the function pointer.
Trait Implementations
impl Debug for FnPtr
[src]
impl From<FnPtr> for Value
[src]
impl FromValue for FnPtr
[src]
fn from_value(value: Value) -> Result<Self, ValueError>
[src]
impl ReflectValueType for FnPtr
[src]
type Owned = FnPtr
The internal, owned type used for this value.
fn value_type() -> ValueType
[src]
fn value_type_info() -> ValueTypeInfo
[src]
impl<'_> ReflectValueType for &'_ FnPtr
[src]
type Owned = FnPtr
The internal, owned type used for this value.
fn value_type() -> ValueType
[src]
fn value_type_info() -> ValueTypeInfo
[src]
impl<'_> UnsafeFromValue for &'_ FnPtr
[src]
Auto Trait Implementations
impl !RefUnwindSafe for FnPtr
impl !Send for FnPtr
impl !Sync for FnPtr
impl Unpin for FnPtr
impl !UnwindSafe for FnPtr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,