Expand description
Type which represents an function in gluon
Implementations
sourceimpl<T, R> Function<T, fn() -> R>where
T: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
impl<T, R> Function<T, fn() -> R>where
T: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<T, R> Function<T, fn() -> R>where
T: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
impl<T, R> Function<T, fn() -> R>where
T: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
sourceimpl<T, A, R> Function<T, fn(_: A) -> R>where
A: for<'vm> Pushable<'vm>,
T: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
impl<T, A, R> Function<T, fn(_: A) -> R>where
A: for<'vm> Pushable<'vm>,
T: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<T, A, R> Function<T, fn(_: A) -> R>where
A: for<'vm> Pushable<'vm>,
T: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
impl<T, A, R> Function<T, fn(_: A) -> R>where
A: for<'vm> Pushable<'vm>,
T: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
sourceimpl<T, A, B, R> Function<T, fn(_: A, _: B) -> R>where
A: for<'vm> Pushable<'vm>,
B: for<'vm> Pushable<'vm>,
T: Deref<Target = Thread>,
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: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<T, A, B, R> Function<T, fn(_: A, _: B) -> R>where
A: for<'vm> Pushable<'vm>,
B: for<'vm> Pushable<'vm>,
T: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
impl<T, A, B, R> Function<T, fn(_: A, _: B) -> R>where
A: for<'vm> Pushable<'vm>,
B: for<'vm> Pushable<'vm>,
T: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
sourceimpl<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: Deref<Target = Thread>,
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: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
sourceimpl<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: Deref<Target = Thread>,
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: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
sourceimpl<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: Deref<Target = Thread>,
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: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
sourceimpl<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: Deref<Target = Thread>,
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: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
sourceimpl<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: Deref<Target = Thread>,
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: Deref<Target = Thread>,
R: VmType + for<'x, 'value> Getable<'x, 'value>,
sourceimpl<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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
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: Deref<Target = Thread> + Clone + Send,
R: VmType + for<'x, 'value> Getable<'x, 'value> + Send + Sync + 'static,
Trait Implementations
sourceimpl<'vm, 'value, F> Getable<'vm, 'value> for Function<RootedThread, F>
impl<'vm, 'value, F> Getable<'vm, 'value> for Function<RootedThread, F>
fn from_value(vm: &'vm Thread, value: Variants<'value>) -> Self
sourceimpl<'vm, T, F: Any> Pushable<'vm> for Function<T, F>where
T: Deref<Target = Thread>,
F: VmType,
impl<'vm, T, F: Any> Pushable<'vm> for Function<T, F>where
T: Deref<Target = Thread>,
F: VmType,
sourcefn push(self, context: &mut ActiveThread<'vm>) -> Result<()>
fn push(self, context: &mut ActiveThread<'vm>) -> 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 morefn status_push(self, context: &mut ActiveThread<'vm>) -> Statuswhere
Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value>where
Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>>where
Self: Sized,
T: VmRoot<'vm>,
sourceimpl<T, F> VmType for Function<T, F>where
T: Deref<Target = Thread>,
F: VmType,
impl<T, F> VmType for Function<T, F>where
T: Deref<Target = Thread>,
F: VmType,
type Type = <F as VmType>::Type
type Type = <F as VmType>::Type
A version of
Self
which implements Any
allowing a TypeId
to be retrievedfn make_forall_type(vm: &Thread) -> ArcType
sourcefn extra_args() -> VmIndex
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
Auto Trait Implementations
impl<T, F> !RefUnwindSafe for Function<T, F>
impl<T, F> Send for Function<T, F>where
F: Send,
T: Send,
impl<T, F> Sync for Function<T, F>where
F: Sync,
T: Sync,
impl<T, F> Unpin for Function<T, F>where
F: Unpin,
T: Unpin,
impl<T, F> !UnwindSafe for Function<T, F>
Blanket Implementations
sourceimpl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
impl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
sourcefn async_push(
self,
context: &mut ActiveThread<'vm>,
_: u32
) -> Result<Async<()>, Error>
fn async_push(
self,
context: &mut ActiveThread<'vm>,
_: u32
) -> Result<Async<()>, Error>
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 morefn async_status_push(
self,
context: &mut ActiveThread<'vm>,
frame_index: VmIndex
) -> Statuswhere
Self: Sized,
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more