pub struct SigReady<'c, C: WithSignals> { /* private fields */ }Implementations§
Methods from Deref<Target = TypedSignal<'c, C, ()>>§
Sourcepub fn builder<'ts>(&'ts self) -> ConnectBuilder<'ts, 'c, C, Ps>
 
pub fn builder<'ts>(&'ts self) -> ConnectBuilder<'ts, 'c, C, Ps>
Fully customizable connection setup.
The returned builder provides several methods to configure how to connect the signal. It needs to be finalized with a call
to any of the builder’s connect_* methods.
Sourcepub fn emit_tuple(&mut self, args: Ps)where
    Ps: OutParamTuple,
 
pub fn emit_tuple(&mut self, args: Ps)where
    Ps: OutParamTuple,
Emit the signal with the given parameters.
This is intended for generic use. Typically, you’ll want to use the more specific emit() method of the code-generated signal
type, which also has named parameters.
Sourcepub fn to_untyped(&self) -> Signal
 
pub fn to_untyped(&self) -> Signal
Returns an untyped version of this signal, suitable for Godot FFI.
This can be passed to GDScript, for instance if you want your function to be awaitable by GDScript code.
Sourcepub fn connect<F>(&self, function: F) -> ConnectHandlewhere
    for<'c_rcv> F: SignalReceiver<(), Ps> + 'static,
    for<'c_rcv> IndirectSignalReceiver<'c_rcv, (), Ps, F>: From<&'c_rcv mut F>,
 
pub fn connect<F>(&self, function: F) -> ConnectHandlewhere
    for<'c_rcv> F: SignalReceiver<(), Ps> + 'static,
    for<'c_rcv> IndirectSignalReceiver<'c_rcv, (), Ps, F>: From<&'c_rcv mut F>,
Connect a non-member function (global function, associated function or closure).
Example usages:
sig.connect(Self::static_func);
sig.connect(global_func);
sig.connect(|arg| { /* closure */ });- To connect to a method on the object that owns this signal, use connect_self().
- If you need connect flagsor cross-thread signals, usebuilder().
Sourcepub fn connect_self<F, Declarer>(&self, function: F) -> ConnectHandlewhere
    for<'c_rcv> F: SignalReceiver<&'c_rcv mut C, Ps> + 'static,
    for<'c_rcv> IndirectSignalReceiver<'c_rcv, &'c_rcv mut C, Ps, F>: From<&'c_rcv mut F>,
    C: UniformObjectDeref<Declarer>,
 
pub fn connect_self<F, Declarer>(&self, function: F) -> ConnectHandlewhere
    for<'c_rcv> F: SignalReceiver<&'c_rcv mut C, Ps> + 'static,
    for<'c_rcv> IndirectSignalReceiver<'c_rcv, &'c_rcv mut C, Ps, F>: From<&'c_rcv mut F>,
    C: UniformObjectDeref<Declarer>,
Connect a method (member function) with &mut self as the first parameter.
- To connect to methods on other objects, use connect_other().
- If you need connect flagsor cross-thread signals, usebuilder().
Sourcepub fn connect_other<F, OtherC, Declarer>(
    &self,
    object: &impl ObjectToOwned<OtherC>,
    method: F,
) -> ConnectHandlewhere
    OtherC: UniformObjectDeref<Declarer>,
    for<'c_rcv> F: SignalReceiver<&'c_rcv mut OtherC, Ps> + 'static,
    for<'c_rcv> IndirectSignalReceiver<'c_rcv, &'c_rcv mut OtherC, Ps, F>: From<&'c_rcv mut F>,
 
pub fn connect_other<F, OtherC, Declarer>(
    &self,
    object: &impl ObjectToOwned<OtherC>,
    method: F,
) -> ConnectHandlewhere
    OtherC: UniformObjectDeref<Declarer>,
    for<'c_rcv> F: SignalReceiver<&'c_rcv mut OtherC, Ps> + 'static,
    for<'c_rcv> IndirectSignalReceiver<'c_rcv, &'c_rcv mut OtherC, Ps, F>: From<&'c_rcv mut F>,
Connect a method (member function) with any &mut OtherC as the first parameter, where
OtherC: GodotClass (both user and engine classes are accepted).
The parameter object can be of 2 different “categories”:
- Any &Gd<OtherC>(e.g.:&Gd<Node>,&Gd<CustomUserClass>).
- &OtherC, as long as- OtherCis a user class that contains a- basefield (it implements the- WithBaseFieldtrait).
- To connect to methods on the object that owns this signal, use connect_self().
- If you need connect flagsor cross-thread signals, usebuilder().
Sourcepub fn to_fallible_future(&self) -> FallibleSignalFuture<R> ⓘ
 
pub fn to_fallible_future(&self) -> FallibleSignalFuture<R> ⓘ
Creates a fallible future for this signal.
The future will resolve the next time the signal is emitted.
See FallibleSignalFuture for details.
Sourcepub fn to_future(&self) -> SignalFuture<R> ⓘ
 
pub fn to_future(&self) -> SignalFuture<R> ⓘ
Creates a future for this signal.
The future will resolve the next time the signal is emitted, but might panic if the signal object is freed.
See SignalFuture for details.