Module object

Source
Expand description

Provides types to interact with the Godot Object class hierarchy

This module contains wrappers and helpers to interact with Godot objects. In Godot, classes stand in an inheritance relationship, with the root at Object.

If you are looking for how to manage user-defined types (native scripts), check out the export module.

Modules§

bounds
Various traits to verify memory policy, ownership policy or lifetime bounds
memory
Marker types to express the memory management method of Godot types.
ownership
Typestates to express ownership and thread safety of Godot types.

Structs§

Instance
A persistent reference to a GodotObject with a rust NativeClass attached.
Null
Represents an explicit null reference in method arguments. This works around type inference issues with Option. You may create Nulls with Null::null or GodotObject::null.
RawObject
An opaque struct representing Godot objects. This should never be created on the stack.
Ref
A polymorphic smart pointer for Godot objects whose behavior changes depending on the memory management method of the underlying type and the thread access status.
TInstance
A reference to a GodotObject with a rust NativeClass attached that is assumed safe during a certain lifetime.
TRef
A temporary safe pointer to Godot objects that tracks thread access status. TRef can be coerced into bare references with Deref.

Traits§

AsArg
Trait for safe conversion from Godot object references into API method arguments. This is a sealed trait with no public interface.
AsVariant
Trait for safe conversion from Godot object references into Variant. This is a sealed trait with no public interface.
GodotObject
Trait for Godot API objects. This trait is sealed, and implemented for generated wrapper types.
Instanciable
GodotObjects that have a zero argument constructor.
NewRef
A trait for incrementing the reference count to a Godot object.
QueueFree
Manually managed Godot classes implementing queue_free. This trait has no public interface. See Ref::queue_free.
SubClass
Marker trait for API types that are subclasses of another type. This trait is implemented by the bindings generator, and has no public interface. Users should not attempt to implement this trait.