pub struct GodotRuntime;
Expand description
Manager for the embedded Godot runtime.
This provides a safe interface for initializing, managing, and shutting down a Godot runtime instance for testing purposes. The runtime is designed to be lightweight and suitable for automated testing environments.
Implementations§
Source§impl GodotRuntime
impl GodotRuntime
Sourcepub fn is_initialized() -> bool
pub fn is_initialized() -> bool
Check if the Godot runtime is currently initialized.
Sourcepub fn is_running() -> bool
pub fn is_running() -> bool
Check if the Godot runtime is currently running.
Sourcepub fn shutdown() -> TestResult<()>
pub fn shutdown() -> TestResult<()>
Shut down the Godot runtime.
This resets the runtime state. Actual cleanup is handled by run_godot.
Sourcepub fn run_godot<F>(
_config: RuntimeConfig,
callbacks: UserCallbacks,
load_scene: F,
) -> TestResult<i32>
pub fn run_godot<F>( _config: RuntimeConfig, callbacks: UserCallbacks, load_scene: F, ) -> TestResult<i32>
Run Godot with SwiftGodot-style initialization.
The load_scene callback receives a raw SceneTree pointer. Users are responsible for converting this to their Godot type.
Auto Trait Implementations§
impl Freeze for GodotRuntime
impl RefUnwindSafe for GodotRuntime
impl Send for GodotRuntime
impl Sync for GodotRuntime
impl Unpin for GodotRuntime
impl UnwindSafe for GodotRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more