Expand description
Often-imported symbols.
Re-exports§
pub use super::builtin::math::FloatExt as _;
pub use super::obj::EngineBitfield as _;
pub use super::obj::EngineEnum as _;
pub use super::obj::NewAlloc as _;
pub use super::obj::NewGd as _;
pub use super::obj::WithBaseField as _;
Modules§
- real_
consts - Re-export of
std::f32::consts
orstd::f64::consts
, depending on precision config.
Macros§
- array
- Constructs
Array
literals, similar to Rust’s standardvec!
macro. - dict
- Constructs
Dictionary
literals, close to Godot’s own syntax. - godot_
error - Pushes an error message to Godot’s built-in debugger and to the OS terminal.
- godot_
print - Prints to the Godot console.
- godot_
print_ rich - Prints to the Godot console. Supports BBCode, color and URL tags.
- godot_
script_ error - Logs a script error to Godot’s built-in debugger and to the OS terminal.
- godot_
warn - Pushes a warning message to Godot’s built-in debugger and to the OS terminal.
- real
- A macro to coerce float-literals into the
real
type. - reals
- Array of reals.
- swizzle
- Access vector components in different order.
- varray
- Constructs
VariantArray
literals, similar to Rust’s standardvec!
macro.
Structs§
- Aabb
- Axis-aligned bounding box in 3D space.
- Array
- Godot’s
Array
type. - Audio
Stream Player - Godot class
AudioStreamPlayer.
- Base
- Restricted version of
Gd
, to hold the base instance inside a user’sGodotClass
. - Basis
- A 3x3 matrix, typically used as an orthogonal basis for
Transform3D
. - Callable
- A
Callable
represents a function in Godot. - Camera2D
- Godot class
Camera2D.
- Camera3D
- Godot class
Camera3D.
- Color
- Color built-in type, in floating-point RGBA format.
- Color
Hsv - HSVA floating-number Color representation.
- Convert
Error - Represents errors that can occur when converting values from Godot.
- Dictionary
- Godot’s
Dictionary
type. - DynGd
- Smart pointer integrating Rust traits via
dyn
dispatch. - DynGd
Mut - Mutably/exclusively bound reference guard for a
DynGd
smart pointer. - DynGd
Ref - Shared reference guard for a
DynGd
smart pointer. - GFile
- Open a file for reading or writing.
- GString
- Godot’s reference counted string type.
- 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. - Input
- Godot class
Input.
- Instance
Id - Represents a non-zero instance ID.
- IoError
- Error that can occur while using
gdext
IO utilities. - Node
- Godot class
Node.
- Node2D
- Godot class
Node2D.
- Node3D
- Godot class
Node3D.
- Node
Path - A pre-parsed scene tree path.
- Object
- Godot class
Object.
- OnReady
- Ergonomic late-initialization container with
ready()
support. - Packed
Byte Array - Implements Godot’s
PackedByteArray
type, which is a space-efficient array ofu8
s. - Packed
Color Array - Implements Godot’s
PackedColorArray
type, which is a space-efficient array ofColor
s. - Packed
Float32 Array - Implements Godot’s
PackedFloat32Array
type, which is a space-efficient array off32
s. - Packed
Float64 Array - Implements Godot’s
PackedFloat64Array
type, which is a space-efficient array off64
s. - Packed
Int32 Array - Implements Godot’s
PackedInt32Array
type, which is a space-efficient array ofi32
s. - Packed
Int64 Array - Implements Godot’s
PackedInt64Array
type, which is a space-efficient array ofi64
s. - Packed
Scene - Godot class
PackedScene.
- Packed
String Array - Implements Godot’s
PackedStringArray
type, which is a space-efficient array ofGString
s. - Packed
Vector2 Array - Implements Godot’s
PackedVector2Array
type, which is a space-efficient array ofVector2
s. - Packed
Vector3 Array - Implements Godot’s
PackedVector3Array
type, which is a space-efficient array ofVector3
s. - Packed
Vector4 Array - Implements Godot’s
PackedVector4Array
type, which is a space-efficient array ofVector4
s. - Plane
- 3D plane in Hessian normal form.
- Projection
- A 4x4 matrix used for 3D projective transformations.
- Quaternion
- Unit quaternion to represent 3D rotations.
- Rect2
- 2D axis-aligned bounding box.
- Rect2i
- 2D axis-aligned integer bounding box.
- RefCounted
- Godot class
RefCounted.
- Resource
- Godot class
Resource.
- Scene
Tree - Godot class
SceneTree.
- Signal
- A
Signal
represents a signal of an Object instance in Godot. - String
Name - A string optimized for unique names.
- Transform2D
- Affine 2D transform (2x3 matrix).
- Transform3D
- Affine 3D transform (3x4 matrix).
- Variant
- Godot variant type, able to store a variety of different types.
- Variant
Operator - Godot enum name:
Variant.Operator
. - Variant
Type - Godot enum name:
Variant.Type
. - Vector2
- Vector used for 2D math using floating point coordinates.
- Vector3
- Vector used for 3D math using floating point coordinates.
- Vector4
- Vector used for 4D math using floating point coordinates.
- Vector2i
- Vector used for 2D math using integer coordinates.
- Vector3i
- Vector used for 3D math using integer coordinates.
- Vector4i
- Vector used for 4D math using integer coordinates.
Enums§
- Color
Channel Order - Defines how individual color channels are laid out in memory.
- Euler
Order - This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
- Projection
Eye - The eye to create a projection for, when creating a projection adjusted for head-mounted displays.
- Projection
Plane - A projection’s clipping plane.
- Rid
- A RID (“resource ID”) is an opaque handle that refers to a Godot
Resource
. - Side
- This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
- Vector2
Axis - Enumerates the axes in a
Vector2
. - Vector3
Axis - Enumerates the axes in a
Vector3
. - Vector4
Axis - Enumerates the axes in a
Vector4
.
Traits§
- AsDyn
- Trait that defines a
T
->dyn Trait
relation for use inDynGd
. - Export
- Trait implemented for types that can be used as
#[export]
fields. - Extension
Library - Defines the entry point for a GDExtension Rust library.
- From
Godot - Defines the canonical conversion from Godot for a type.
- Godot
Class - Makes
T
eligible to be managed by Godot and stored inGd<T>
pointers. - Godot
Convert - Indicates that a type can be passed to/from Godot, either directly or through an intermediate “via” type.
- IAudio
Stream Player - Virtual methods for class
AudioStreamPlayer
. - ICamera2D
- Virtual methods for class
Camera2D
. - ICamera3D
- Virtual methods for class
Camera3D
. - INode
- Virtual methods for class
Node
. - INode2D
- Virtual methods for class
Node2D
. - INode3D
- Virtual methods for class
Node3D
. - IObject
- Virtual methods for class
Object
. - IPacked
Scene - Virtual methods for class
PackedScene
. - IRef
Counted - Virtual methods for class
RefCounted
. - IResource
- Virtual methods for class
Resource
. - IScene
Tree - Virtual methods for class
SceneTree
. - Inherits
- Non-strict inheritance relationship in the Godot class hierarchy.
- Real
Conv - Convenience conversion between
real
andf32
/f64
. - Rust
Callable - Represents a custom callable object defined in Rust.
- ToGodot
- Defines the canonical conversion to Godot for a type.
- Var
- Trait implemented for types that can be used as
#[var]
fields.
Functions§
- load
- ⚠️ Loads a resource from the filesystem located at
path
, panicking on error. - save
- ⚠️ Saves a
Resource
-inheriting object into the file located atpath
. - try_
load - Loads a resource from the filesystem located at
path
. - try_
save - Saves a
Resource
-inheriting object into the file located atpath
.
Type Aliases§
- Init
Level - Stage of the Godot initialization process.
- Variant
Array - A Godot
Array
without an assigned type. - real
- Floating point type used for many structs and functions in Godot.
Attribute Macros§
- gdextension
- Proc-macro attribute to be used in combination with the
ExtensionLibrary
trait. - godot_
api - Proc-macro attribute to be used with
impl
blocks of#[derive(GodotClass)]
structs. - godot_
dyn - Generates a
Class
->dyn Trait
upcasting relation.
Derive Macros§
- Export
- Derive macro for
Export
on enums. - Godot
Class - Derive macro for
GodotClass
on structs. - Godot
Convert - Derive macro for
GodotConvert
on structs. - Var
- Derive macro for
Var
on enums.