[−][src]Struct gluon_vm::api::function::Function
Type which represents an function in gluon
Implementations
impl<T, F> Function<T, F> where
T: VmRootInternal,
[src]
T: VmRootInternal,
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]
U: VmRoot<'vm>,
impl<T, R> Function<T, fn() -> R> where
T: VmRootInternal,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
[src]
T: VmRootInternal,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
impl<T, R> Function<T, fn() -> R> where
T: VmRootInternal + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
[src]
T: VmRootInternal + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
pub async fn call_async<'_>(&'_ mut self) -> Result<R>
[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]
A: for<'vm> Pushable<'vm>,
T: VmRootInternal,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
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]
A: for<'vm> Pushable<'vm>,
T: VmRootInternal + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
pub async fn call_async<'_>(&'_ mut self, A: A) -> 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,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
[src]
A: for<'vm> Pushable<'vm>,
B: for<'vm> Pushable<'vm>,
T: VmRootInternal,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
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]
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,
pub async fn call_async<'_>(&'_ mut self, A: A, B: B) -> 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,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
[src]
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>,
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]
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,
pub async fn call_async<'_>(&'_ mut self, A: A, B: B, C: C) -> 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,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
[src]
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>,
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]
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,
pub async fn call_async<'_>(&'_ mut self, A: A, B: B, C: C, D: D) -> 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,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
[src]
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>,
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]
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,
pub async fn call_async<'_>(
&'_ mut self,
A: A,
B: B,
C: C,
D: D,
E: E
) -> Result<R>
[src]
&'_ mut self,
A: A,
B: B,
C: C,
D: D,
E: E
) -> Result<R>
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]
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>,
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]
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,
pub async fn call_async<'_>(
&'_ mut self,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F
) -> Result<R>
[src]
&'_ mut self,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F
) -> Result<R>
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]
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>,
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]
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,
pub async fn call_async<'_>(
&'_ mut self,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G
) -> Result<R>
[src]
&'_ mut self,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G
) -> Result<R>
impl<'vm, T, F> Function<T, F> where
T: VmRootInternal + 'vm,
F: VmType,
[src]
T: VmRootInternal + 'vm,
F: VmType,
pub fn cast<F2>(self) -> Result<Function<T, F2>> where
F2: VmType,
[src]
F2: VmType,
pub fn call_any<A, R>(&'vm self, args: impl IntoIterator<Item = A>) -> Result<R> where
A: Pushable<'vm>,
R: for<'value> Getable<'vm, 'value> + VmType,
[src]
A: Pushable<'vm>,
R: for<'value> Getable<'vm, 'value> + VmType,
Calls self
with a number of arguments that is only known at runtime.
WARNING: No check is done that the number of arguments is correct. The VM may return an error or panic if an incorrect number of arguments is passed.
Trait Implementations
impl<T: Clone, F: Clone> Clone for Function<T, F> where
T: VmRootInternal,
[src]
T: VmRootInternal,
impl<T: Debug, F: Debug> Debug for Function<T, F> where
T: VmRootInternal,
[src]
T: VmRootInternal,
impl<'de, V> Deserialize<'de> for Function<RootedThread, V>
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<'vm, 'value, F> Getable<'vm, 'value> for Function<&'vm Thread, F>
[src]
type Proxy = Variants<'value>
fn to_proxy(_vm: &'vm Thread, value: Variants<'value>) -> Result<Self::Proxy>
[src]
fn from_proxy(vm: &'vm Thread, proxy: &'value mut Self::Proxy) -> Self
[src]
fn from_value(
vm: &'vm Thread,
value: Variants<'value>
) -> Function<&'vm Thread, F>
[src]
vm: &'vm Thread,
value: Variants<'value>
) -> Function<&'vm Thread, F>
impl<'vm, 'value, F> Getable<'vm, 'value> for Function<RootedThread, F>
[src]
type Proxy = Variants<'value>
fn to_proxy(_vm: &'vm Thread, value: Variants<'value>) -> Result<Self::Proxy>
[src]
fn from_proxy(vm: &'vm Thread, proxy: &'value mut Self::Proxy) -> Self
[src]
fn from_value(vm: &'vm Thread, value: Variants<'value>) -> Self
[src]
impl<'vm, T, F: Any> Pushable<'vm> for Function<T, F> where
T: VmRootInternal,
F: VmType,
[src]
T: VmRootInternal,
F: VmType,
fn push(self, context: &mut ActiveThread<'vm>) -> Result<()>
[src]
fn status_push(self, context: &mut ActiveThread<'vm>) -> Status where
Self: Sized,
[src]
Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value> where
Self: Sized,
[src]
Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>> where
Self: Sized,
T: VmRoot<'vm>,
[src]
Self: Sized,
T: VmRoot<'vm>,
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]
T: VmRootInternal,
F: VmType,
Auto Trait Implementations
impl<T, F> !RefUnwindSafe for Function<T, F>
impl<T, F> Send for Function<T, F> where
F: Send,
T: Send,
F: Send,
T: Send,
impl<T, F> Sync for Function<T, F> where
F: Sync,
T: Sync,
F: Sync,
T: Sync,
impl<T, F> Unpin for Function<T, F> where
F: Unpin,
T: Unpin,
F: Unpin,
T: Unpin,
impl<T, F> !UnwindSafe for Function<T, F>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<'vm, T> AsyncPushable<'vm> for T where
T: Pushable<'vm>,
[src]
T: Pushable<'vm>,
fn async_push(
Self,
&mut ActiveThread<'vm>,
Lock,
u32
) -> Poll<Result<(), Error>>
[src]
Self,
&mut ActiveThread<'vm>,
Lock,
u32
) -> Poll<Result<(), Error>>
fn async_status_push(
self,
context: &mut ActiveThread<'vm>,
lock: Lock,
frame_index: VmIndex
) -> Status where
Self: Sized,
[src]
self,
context: &mut ActiveThread<'vm>,
lock: Lock,
frame_index: VmIndex
) -> Status where
Self: 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> Captures<'_> for T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
[src]
type Remainder = Choices
fn subset(
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
[src]
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastArc for T where
T: Downcast + Send + Sync,
[src]
T: Downcast + Send + Sync,
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<D, T> FromPtr<D> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U, I> LiftInto<U, I> for T where
U: LiftFrom<T, I>,
[src]
U: LiftFrom<T, I>,
impl<'vm, T> Pushable<'vm> for T where
T: Userdata,
[src]
T: Userdata,
fn push(Self, &mut ActiveThread<'vm>) -> Result<(), Error>
[src]
fn status_push(self, context: &mut ActiveThread<'vm>) -> Status where
Self: Sized,
[src]
Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value> where
Self: Sized,
[src]
Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>> where
Self: Sized,
T: VmRoot<'vm>,
[src]
Self: Sized,
T: VmRoot<'vm>,
impl<Source> Sculptor<HNil, HNil> for Source
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,