[][src]Struct runestick::FnPtr

pub struct FnPtr { /* fields omitted */ }

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]

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]

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]

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]

Perform a call over the function pointer.

Trait Implementations

impl Debug for FnPtr[src]

impl FromValue for FnPtr[src]

impl ReflectValueType for FnPtr[src]

type Owned = FnPtr

The internal, owned type used for this value.

impl<'_> ReflectValueType for &'_ FnPtr[src]

type Owned = FnPtr

The internal, owned type used for this value.

impl ToValue for FnPtr[src]

impl<'_> UnsafeFromValue for &'_ FnPtr[src]

type Output = *const FnPtr

The output type from the unsafe coercion.

type Guard = RawOwnedRef

The raw guard returned. Read more

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,