pub struct SignalBuilder<'a, C> { /* private fields */ }
Expand description

Class to construct a signal. Make sure to call Self::done() in the end.

Signal parameters can be added with the various param*() methods. Keep in mind that unlike function parameters, signal parameters (both their lengths and types) are not statically checked in Godot. The parameter signature you specify is simply to assist you in the editor UI and with auto-generation of GDScript signal handlers.

Implementations§

Add a parameter for the signal with a name and type.

Note that GDScript signal parameters are generally untyped and not checked at runtime. The type is solely used for UI purposes.

Add a parameter for the signal with a name and default value.

The type is inferred from the default value. Note that GDScript signal parameters are generally untyped and not checked at runtime. The type is solely used for UI purposes.

Add a (untyped) parameter for the signal with a name.

Types are not required or checked at runtime, but they help for editor UI and auto-generation of signal listeners.

Add a parameter for the signal, manually configured.

Finish registering the signal.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.