Trait ObjectSignalExt

Source
pub trait ObjectSignalExt: ObjectType {
    // Required methods
    unsafe fn handle_closure(
        &self,
        signal: &ConnectDetails,
        callback: &Closure,
    ) -> Result<SignalHandlerId, BoolError>;
    fn remove_handle(&self, handle: SignalHandlerId);
    fn handle<S, S_, C>(&self, signal: S_, callback: C) -> SignalHandlerId
       where C: Fn(&Self, S::Arguments) -> <S::Return as ToValueOption>::Type,
             S: DetailedSignal,
             S_: Into<ConnectDetails<S>>,
             Self: Notifies<S::Signal>;
    fn signal_stream<S, S_>(
        &self,
        signal: S_,
    ) -> SignalStream<Self, S::Arguments>
       where S: DetailedSignal,
             S_: Into<ConnectDetails<S>>,
             Self: Notifies<S::Signal>,
             <S::Return as ToValueOption>::Type: Default;
}

Required Methods§

Source

unsafe fn handle_closure( &self, signal: &ConnectDetails, callback: &Closure, ) -> Result<SignalHandlerId, BoolError>

Source

fn remove_handle(&self, handle: SignalHandlerId)

Source

fn handle<S, S_, C>(&self, signal: S_, callback: C) -> SignalHandlerId
where C: Fn(&Self, S::Arguments) -> <S::Return as ToValueOption>::Type, S: DetailedSignal, S_: Into<ConnectDetails<S>>, Self: Notifies<S::Signal>,

Source

fn signal_stream<S, S_>(&self, signal: S_) -> SignalStream<Self, S::Arguments>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<O: ObjectType> ObjectSignalExt for O
where for<'a> BorrowedObject<'a, O>: FromValue<'a>,