ReactiveNamespace
@dynamicMemberLookup
public struct ReactiveNamespace
Combine utilities for the ObjectPublisher
are exposed through this namespace. Extend this type if you need to add other Combine Publisher utilities for ObjectPublisher
.
-
The
ObjectPublisher
instanceDeclaration
Swift
public let base: ObjectPublisher
-
Returns a
Publisher
that emits anObjectSnapshot?
whenever changes occur in theObjectPublisher
. The event emitsnil
if the object has been deletd.objectPublisher.reactive .snapshot(emitInitialValue: true) .sink( receiveCompletion: { result in // ... }, receiveValue: { (objectSnapshot) in tableViewCell.setObject(objectSnapshot) } ) .store(in: &tableViewCell.cancellables)
Declaration
Swift
public func snapshot(emitInitialValue: Bool = true) -> ObjectPublisher.SnapshotPublisher
Parameters
emitInitialValue
If
true
, the current value is immediately emitted to the first subscriber. Iffalse
, the event fires only starting the nextObjectSnapshot
update.Return Value
A
Publisher
that emits anObjectSnapshot?
whenever changes occur in theObjectPublisher
. The event emitsnil
if the object has been deletd.
-
Returns the value for the property identified by a given key.
Declaration
Swift
public subscript<V>(dynamicMember member: KeyPath<O, V>) -> some Publisher where V : AllowedObjectiveCKeyPathValue { get }
-
Returns the value for the property identified by a given key.
Declaration
Swift
public subscript<OBase, V>(dynamicMember member: KeyPath<O, FieldContainer<OBase>.Stored<V>>) -> some Publisher where OBase : CoreStoreObject, V : FieldStorableType { get }
-
Returns the value for the property identified by a given key.
Declaration
Swift
public subscript<OBase, V>(dynamicMember member: KeyPath<O, FieldContainer<OBase>.Virtual<V>>) -> some Publisher where OBase : CoreStoreObject { get }
-
Returns the value for the property identified by a given key.
Declaration
Swift
public subscript<OBase, V>(dynamicMember member: KeyPath<O, FieldContainer<OBase>.Coded<V>>) -> some Publisher where OBase : CoreStoreObject { get }