EntityObserver

public struct EntityObserver<T>

A type registering observers on a given entity from identity storage

  • Declaration

    Swift

    public typealias OnChange = (T) -> Void
  • Declaration

    Swift

    public let value: T
  • Declaration

    Swift

    public func observe(onChange: @escaping OnChange) -> Subscription
  • A Publisher emitting the observer current value and subscribing to any subsequents new values

    Declaration

    Swift

    public var asPublisher: AnyPublisher<T, Never> { get }