Crate gdnative_async
source · [−]Expand description
Runtime async support for godot-rust.
This crate contains types and functions that enable using async code with godot-rust.
Safety assumptions
This crate assumes that all user non-Rust code follow the official threading guidelines.
Structs
Adapter for async methods that implements
Method
and can be registered.Context for creating
yield
-like futures in async methods.A helper structure for working around naming future types. See
Spawner::spawn
.Traits
Trait for async methods. When exported, such methods return
FunctionState
-like
objects that can be manually resumed or yielded to completion.Functions
Adds required supporting NativeScript classes to
handle
. This must be called once and
only once per initialization.Sets the global executor for the current thread to a
Box<dyn LocalSpawn>
. This value is leaked.Sets the global executor for the current thread to a
&'static dyn LocalSpawn
.Releases all observers still in use. This should be called in the
godot_gdnative_terminate
callback.