godot

Module obj

Expand description

Types and traits related to objects.

The most important symbols in this module are:

  • GodotClass, which is implemented for every class that Godot can work with (either engine- or user-provided).
  • Gd, a smart pointer that manages instances of Godot classes.

Modules§

bounds
Different ways how bounds of a GodotClass can be checked.
cap
Capability traits, providing dedicated functionalities for Godot classes
script
Functionality related to script instances (Rust code that can be attached as node scripts).

Structs§

Base
Restricted version of Gd, to hold the base instance inside a user’s GodotClass.
BaseMut
Mutable/exclusive reference guard for a Base pointer.
BaseRef
Shared reference guard for a Base pointer.
DynGd
Smart pointer integrating Rust traits via dyn dispatch.
DynGdMut
Mutably/exclusively bound reference guard for a DynGd smart pointer.
DynGdRef
Shared reference guard for a DynGd smart pointer.
Gd
Smart pointer to objects owned by the Godot engine.
GdMut
Mutably/exclusively bound reference guard for a Gd smart pointer.
GdRef
Immutably/shared bound reference guard for a Gd smart pointer.
InstanceId
Represents a non-zero instance ID.
OnReady
Ergonomic late-initialization container with ready() support.

Enums§

NoBase
Type representing the absence of a base class, at the root of the hierarchy.

Traits§

AsDyn
Trait that defines a T -> dyn Trait relation for use in DynGd.
Bounds
Library-implemented trait to check bounds on GodotClass types.
EngineBitfield
Auto-implemented for all engine-provided bitfields.
EngineEnum
Auto-implemented for all engine-provided enums.
GodotClass
Makes T eligible to be managed by Godot and stored in Gd<T> pointers.
IndexEnum
Trait for enums that can be used as indices in arrays.
Inherits
Non-strict inheritance relationship in the Godot class hierarchy.
NewAlloc
Extension trait for all manually managed classes.
NewGd
Extension trait for all reference-counted classes.
WithBaseField
Trait that is automatically implemented for user classes containing a Base<T> field.