[][src]Struct gluon_vm::api::function::Function

pub struct Function<T, F> where
    T: VmRootInternal
{ /* fields omitted */ }

Type which represents an function in gluon

Methods

impl<T, F> Function<T, F> where
    T: VmRootInternal
[src]

pub fn get_variant(&self) -> Variants[src]

pub fn vm(&self) -> &Thread[src]

pub fn re_root<'vm, U>(&self, vm: U) -> Result<Function<U, F>> where
    U: VmRoot<'vm>, 
[src]

impl<T, R> Function<T, fn() -> R> where
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self) -> Result<R>[src]

impl<T, R> Function<T, fn() -> R> where
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, A, R> Function<T, fn(_: A) -> R> where
    A: for<'vm> Pushable<'vm>,
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self, A: A) -> Result<R>[src]

impl<T, A, R> Function<T, fn(_: A) -> R> where
    A: for<'vm> Pushable<'vm>,
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self,
    A: A
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self,
    A: A
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, A, B, R> Function<T, fn(_: A, _: B) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self, A: A, B: B) -> Result<R>[src]

impl<T, A, B, R> Function<T, fn(_: A, _: B) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self,
    A: A,
    B: B
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self,
    A: A,
    B: B
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, A, B, C, R> Function<T, fn(_: A, _: B, _: C) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self, A: A, B: B, C: C) -> Result<R>[src]

impl<T, A, B, C, R> Function<T, fn(_: A, _: B, _: C) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self,
    A: A,
    B: B,
    C: C
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self,
    A: A,
    B: B,
    C: C
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, A, B, C, D, R> Function<T, fn(_: A, _: B, _: C, _: D) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self, A: A, B: B, C: C, D: D) -> Result<R>[src]

impl<T, A, B, C, D, R> Function<T, fn(_: A, _: B, _: C, _: D) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, A, B, C, D, E, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    E: for<'vm> Pushable<'vm>,
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self, A: A, B: B, C: C, D: D, E: E) -> Result<R>[src]

impl<T, A, B, C, D, E, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    E: for<'vm> Pushable<'vm>,
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, A, B, C, D, E, F, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    E: for<'vm> Pushable<'vm>,
    F: for<'vm> Pushable<'vm>,
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self, A: A, B: B, C: C, D: D, E: E, F: F) -> Result<R>[src]

impl<T, A, B, C, D, E, F, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    E: for<'vm> Pushable<'vm>,
    F: for<'vm> Pushable<'vm>,
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E,
    F: F
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E,
    F: F
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, A, B, C, D, E, F, G, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    E: for<'vm> Pushable<'vm>,
    F: for<'vm> Pushable<'vm>,
    G: for<'vm> Pushable<'vm>,
    T: VmRootInternal,
    R: VmType + for<'x, 'value> Getable<'x, 'value>, 
[src]

pub fn call(&mut self, A: A, B: B, C: C, D: D, E: E, F: F, G: G) -> Result<R>[src]

impl<T, A, B, C, D, E, F, G, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R> where
    A: for<'vm> Pushable<'vm>,
    B: for<'vm> Pushable<'vm>,
    C: for<'vm> Pushable<'vm>,
    D: for<'vm> Pushable<'vm>,
    E: for<'vm> Pushable<'vm>,
    F: for<'vm> Pushable<'vm>,
    G: for<'vm> Pushable<'vm>,
    T: VmRootInternal + Clone + Send,
    R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static, 
[src]

pub fn call_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E,
    F: F,
    G: G
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

pub fn call_fast_async(
    &mut self,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E,
    F: F,
    G: G
) -> Box<dyn Future<Item = R, Error = Error> + Send + Sync + 'static>
[src]

impl<T, F> Function<T, F> where
    T: VmRootInternal,
    F: VmType
[src]

pub fn cast<F2>(self) -> Result<Function<T, F2>> where
    F2: VmType
[src]

Trait Implementations

impl<T: VmRootInternal + Trace, F> Trace for Function<T, F>[src]

impl<T, F> VmType for Function<T, F> where
    T: VmRootInternal,
    F: VmType
[src]

type Type = F::Type

A version of Self which implements Any allowing a TypeId to be retrieved

fn make_forall_type(vm: &Thread) -> ArcType[src]

fn extra_args() -> VmIndex[src]

How many extra arguments a function returning this type requires. Used for abstract types which when used in return position should act like they still need more arguments before they are called Read more

impl<'vm, T, F: Any> Pushable<'vm> for Function<T, F> where
    T: VmRootInternal,
    F: VmType
[src]

fn status_push(self, context: &mut ActiveThread<'vm>) -> Status where
    Self: Sized
[src]

unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value> where
    Self: Sized
[src]

fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>> where
    Self: Sized,
    T: VmRoot<'vm>, 
[src]

impl<'vm, 'value, F> Getable<'vm, 'value> for Function<&'vm Thread, F>[src]

type Proxy = Variants<'value>

impl<'vm, 'value, F> Getable<'vm, 'value> for Function<RootedThread, F>[src]

type Proxy = Variants<'value>

impl<T: Clone, F: Clone> Clone for Function<T, F> where
    T: VmRootInternal
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug, F: Debug> Debug for Function<T, F> where
    T: VmRootInternal
[src]

Auto Trait Implementations

impl<T, F> Send for Function<T, F> where
    F: Send,
    T: Send

impl<T, F> Unpin for Function<T, F> where
    F: Unpin,
    T: Unpin

impl<T, F> Sync for Function<T, F> where
    F: Sync,
    T: Sync

impl<T, F> !UnwindSafe for Function<T, F>

impl<T, F> !RefUnwindSafe for Function<T, F>

Blanket Implementations

impl<D, T> FromPtr<D> for T[src]

impl<'vm, T> AsyncPushable<'vm> for T where
    T: Pushable<'vm>, 
[src]

fn async_status_push(
    self,
    context: &mut ActiveThread<'vm>,
    frame_index: VmIndex
) -> Status where
    Self: Sized
[src]

impl<'vm, T> Pushable<'vm> for T where
    T: Userdata
[src]

fn status_push(self, context: &mut ActiveThread<'vm>) -> Status where
    Self: Sized
[src]

unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value> where
    Self: Sized
[src]

fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>> where
    Self: Sized,
    T: VmRoot<'vm>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices[src]

type Remainder = Choices

impl<Source> Sculptor<HNil, HNil> for Source[src]

type Remainder = Source

impl<T, U, I> LiftInto<U, I> for T where
    U: LiftFrom<T, I>, 
[src]

impl<T> Any for T where
    T: Any
[src]