SignalObserver
public struct SignalObserver<T>
An observer that responds to events delivered by a Signal.
-
The event callback function.
Declaration
Swift
public let onEvent: (SignalEvent<T>) -> Void -
Initializes the observer with a callback function.
Declaration
Swift
public init(onEvent: @escaping (SignalEvent<T>) -> Void) -
Invokes
onEventwith a.beginPossibleAsyncChangeevent.Declaration
Swift
public func notifyBeginPossibleAsyncChange() -
Invokes
onEventwith a.valueChangingevent.Declaration
Swift
public func notifyValueChanging(_ change: T, _ metadata: ChangeMetadata) -
Invokes
onEventwith a.valueChangingevent.Declaration
Swift
public func notifyValueChanging(_ change: T, transient: Bool = false) -
Invokes
onEventwith an.endPossibleAsyncChangeevent.Declaration
Swift
public func notifyEndPossibleAsyncChange()
SignalObserver Structure Reference