Struct gdnative_core::init::InitHandle
source · pub struct InitHandle { /* private fields */ }
Expand description
A handle that can register new classes to the engine during initialization.
See godot_nativescript_init
and
godot_init
.
Implementations§
source§impl InitHandle
impl InitHandle
sourcepub fn add_class<C>(self)where
C: NativeClassMethods + StaticallyNamed,
pub fn add_class<C>(self)where
C: NativeClassMethods + StaticallyNamed,
Registers a new class to the engine.
sourcepub fn add_class_with<C>(self, f: impl FnOnce(&ClassBuilder<C>))where
C: NativeClassMethods + StaticallyNamed,
pub fn add_class_with<C>(self, f: impl FnOnce(&ClassBuilder<C>))where
C: NativeClassMethods + StaticallyNamed,
Registers a new class to the engine.
sourcepub fn add_tool_class<C>(self)where
C: NativeClassMethods + StaticallyNamed,
pub fn add_tool_class<C>(self)where
C: NativeClassMethods + StaticallyNamed,
Registers a new tool class to the engine.
sourcepub fn add_tool_class_with<C>(self, f: impl FnOnce(&ClassBuilder<C>))where
C: NativeClassMethods + StaticallyNamed,
pub fn add_tool_class_with<C>(self, f: impl FnOnce(&ClassBuilder<C>))where
C: NativeClassMethods + StaticallyNamed,
Registers a new tool class to the engine.
sourcepub fn add_class_as<C>(self, name: String)where
C: NativeClassMethods,
pub fn add_class_as<C>(self, name: String)where
C: NativeClassMethods,
Registers a new class to the engine
If the type implements [StaticallyTyped
], that name is ignored in favor of the
name provided at registration.
sourcepub fn add_class_as_with<C>(self, name: String, f: impl FnOnce(&ClassBuilder<C>))where
C: NativeClassMethods,
pub fn add_class_as_with<C>(self, name: String, f: impl FnOnce(&ClassBuilder<C>))where
C: NativeClassMethods,
Registers a new class to the engine
If the type implements [StaticallyTyped
], that name is ignored in favor of the
name provided at registration.
sourcepub fn add_tool_class_as<C>(self, name: String)where
C: NativeClassMethods,
pub fn add_tool_class_as<C>(self, name: String)where
C: NativeClassMethods,
Registers a new tool class to the engine
If the type implements [StaticallyTyped
], that name is ignored in favor of the
name provided at registration.
sourcepub fn add_tool_class_as_with<C>(
self,
name: String,
f: impl FnOnce(&ClassBuilder<C>)
)where
C: NativeClassMethods,
pub fn add_tool_class_as_with<C>(
self,
name: String,
f: impl FnOnce(&ClassBuilder<C>)
)where
C: NativeClassMethods,
Registers a new tool class to the engine
If the type implements [StaticallyTyped
], that name is ignored in favor of the
name provided at registration.
Trait Implementations§
source§impl Clone for InitHandle
impl Clone for InitHandle
source§fn clone(&self) -> InitHandle
fn clone(&self) -> InitHandle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more