Struct SigTreeProcessModeChanged

Source
pub struct SigTreeProcessModeChanged<'c, C: WithSignals> { /* private fields */ }
Available on since_api="4.2" only.

Implementations§

Source§

impl<'c, C: WithSignals> SigTreeProcessModeChanged<'c, C>

Source

pub fn emit(&mut self)

Methods from Deref<Target = TypedSignal<'c, C, ()>>§

Source

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.

Source

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.

Source

pub fn connect<F>(&self, function: F)
where 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 */ });
Source

pub fn connect_self<F, Declarer>(&self, function: F)
where 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.

Source

pub fn connect_other<F, OtherC, Declarer>( &self, object: &impl ToSignalObj<OtherC>, method: F, )
where 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 OtherC is a user class that contains a base field (it implements the WithBaseField trait).

Source

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.

Source

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.

Trait Implementations§

Source§

impl<'c, C: WithSignals> Deref for SigTreeProcessModeChanged<'c, C>

Source§

type Target = TypedSignal<'c, C, ()>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<C: WithSignals> DerefMut for SigTreeProcessModeChanged<'_, C>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'c, C> Freeze for SigTreeProcessModeChanged<'c, C>
where <C as WithSignals>::__SignalObj<'c>: Freeze,

§

impl<'c, C> RefUnwindSafe for SigTreeProcessModeChanged<'c, C>

§

impl<'c, C> Send for SigTreeProcessModeChanged<'c, C>
where <C as WithSignals>::__SignalObj<'c>: Send,

§

impl<'c, C> Sync for SigTreeProcessModeChanged<'c, C>
where <C as WithSignals>::__SignalObj<'c>: Sync,

§

impl<'c, C> Unpin for SigTreeProcessModeChanged<'c, C>
where <C as WithSignals>::__SignalObj<'c>: Unpin,

§

impl<'c, C> UnwindSafe for SigTreeProcessModeChanged<'c, C>
where <C as WithSignals>::__SignalObj<'c>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.