[][src]Function qmetaobject::future::wait_on_signal

pub unsafe fn wait_on_signal<Args: SignalArgArrayToTuple>(
    sender: *const c_void,
    signal: CppSignal<Args>
) -> impl Future<Output = <Args as SignalArgArrayToTuple>::Tuple>

Create a future that waits on the emission of a signal.

The arguments of the signal need to implement Clone, and the Output of the future is a tuple containing the arguments of the signal (or the empty tuple if there are none.)

The future will be ready as soon as the signal is emited.

This is unsafe for the same reason that connections::connect is unsafe.