[][src]Struct rune_testing::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) + 'static + Sync>
) -> FnPtr
[src]

Create a function pointer from a handler.

pub fn from_offset(
    context: Rc<Context>,
    unit: Rc<Unit>,
    offset: usize,
    call: UnitFnCall,
    args: usize
) -> FnPtr
[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
) -> FnPtr
[src]

Create a function pointer from an offset.

pub fn from_tuple(hash: Hash, args: usize) -> FnPtr[src]

Create a function pointer from an offset.

pub fn from_variant_tuple(enum_hash: Hash, hash: Hash, args: usize) -> FnPtr[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 From<FnPtr> for Value[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<'_> 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> ToValue for T where
    Value: 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<T> UnsafeFromValue for T where
    T: FromValue
[src]

type Output = T

The output type from the unsafe coercion.

type Guard = ()

The raw guard returned. Read more

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