Struct gluon_vm::api::Function
[−]
[src]
pub struct Function<T, F> where T: Deref<Target=Thread> { /* fields omitted */ }
Type which represents an function in gluon
Methods
impl<T, F> Function<T, F> where T: Deref<Target=Thread>
[src]
impl<'vm, T, R> Function<T, fn() -> R> where T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
R: VmType + for<'x> Getable<'x>
impl<'vm, T, R> Function<T, fn() -> R> where T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self) -> BoxFuture<R, Error>
impl<'vm, T, A, R> Function<T, fn(_: A) -> R> where A: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
impl<'vm, T, A, R> Function<T, fn(_: A) -> R> where A: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self, A: A) -> BoxFuture<R, Error>
impl<'vm, T, A, B, R> Function<T, fn(_: A, _: B) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
B: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
impl<'vm, T, A, B, R> Function<T, fn(_: A, _: B) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
B: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self, A: A, B: B) -> BoxFuture<R, Error>
impl<'vm, T, A, B, C, R> Function<T, fn(_: A, _: B, _: C) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
impl<'vm, T, A, B, C, R> Function<T, fn(_: A, _: B, _: C) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self, A: A, B: B, C: C) -> BoxFuture<R, Error>
impl<'vm, T, A, B, C, D, R> Function<T, fn(_: A, _: B, _: C, _: D) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
impl<'vm, T, A, B, C, D, R> Function<T, fn(_: A, _: B, _: C, _: D) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self, A: A, B: B, C: C, D: D) -> BoxFuture<R, Error>
impl<'vm, T, A, B, C, D, E, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
impl<'vm, T, A, B, C, D, E, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self,
A: A,
B: B,
C: C,
D: D,
E: E)
-> BoxFuture<R, Error>
A: A,
B: B,
C: C,
D: D,
E: E)
-> BoxFuture<R, Error>
impl<'vm, T, A, B, C, D, E, F, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
impl<'vm, T, A, B, C, D, E, F, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F)
-> BoxFuture<R, Error>
A: A,
B: B,
C: C,
D: D,
E: E,
F: F)
-> BoxFuture<R, Error>
impl<'vm, T, A, B, C, D, E, F, G, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
G: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
G: Pushable<'vm>,
T: Deref<Target=Thread>,
R: VmType + for<'x> Getable<'x>
impl<'vm, T, A, B, C, D, E, F, G, R> Function<T, fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R> where A: Pushable<'vm>,
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
G: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
[src]
B: Pushable<'vm>,
C: Pushable<'vm>,
D: Pushable<'vm>,
E: Pushable<'vm>,
F: Pushable<'vm>,
G: Pushable<'vm>,
T: Deref<Target=Thread> + Clone + Send + 'static,
R: VmType + for<'x> Getable<'x> + Send + 'static
fn call_async(&'vm mut self,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G)
-> BoxFuture<R, Error>
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G)
-> BoxFuture<R, Error>
Trait Implementations
impl<T, F> Clone for Function<T, F> where T: Deref<Target=Thread> + Clone
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T, F> VmType for Function<T, F> where T: Deref<Target=Thread>, F: VmType
[src]
type Type = F::Type
A version of Self
which implements Any
allowing a TypeId
to be retrieved
fn make_type(vm: &Thread) -> ArcType
Creates an gluon type which maps to Self
in rust
fn extra_args() -> VmIndex
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: Deref<Target=Thread>,
F: VmType
[src]
F: VmType
fn push(self, _: &'vm Thread, context: &mut Context) -> Result<()>
Pushes self
to stack
. If the call is successful a single element should have been added to the stack and Ok(())
should be returned. If the call is unsuccessful Status:Error
should be returned and the stack should be left intact Read more
impl<'vm, F> Getable<'vm> for Function<&'vm Thread, F>
[src]
fn from_value(vm: &'vm Thread,
value: Variants)
-> Option<Function<&'vm Thread, F>>
value: Variants)
-> Option<Function<&'vm Thread, F>>
unsafe fn from_value_unsafe(vm: &'vm Thread, value: Variants) -> Option<Self>
unsafe version of from_value which allows references to the internal of GcPtr's to be extracted if value
is rooted Read more
impl<'vm, F> Getable<'vm> for Function<RootedThread, F>
[src]
fn from_value(vm: &'vm Thread, value: Variants) -> Option<Self>
unsafe fn from_value_unsafe(vm: &'vm Thread, value: Variants) -> Option<Self>
unsafe version of from_value which allows references to the internal of GcPtr's to be extracted if value
is rooted Read more