RealmPublishers

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public enum RealmPublishers

Combine publishers for Realm types.

You normally should not create any of these types directly, and should instead use the extension methods which create them.

  • A publisher which emits an asynchronously opened Realm.

    See more

    Declaration

    Swift

    @frozen
    public struct AsyncOpenPublisher : Publisher
  • A publisher which emits Void each time the Realm is refreshed.

    Despite the name, this actually emits after the Realm is refreshed.

    See more

    Declaration

    Swift

    @frozen
    public struct RealmWillChange : Publisher
  • A publisher which emits Void each time the object is mutated.

    Despite the name, this actually emits after the collection has changed.

    See more

    Declaration

    Swift

    @frozen
    public struct WillChange<Collection> : Publisher where Collection : RealmSubscribable, Collection : ThreadConfined
  • A publisher which emits Void each time the object is mutated.

    Despite the name, this actually emits after the collection has changed.

    See more

    Declaration

    Swift

    public class WillChangeWithToken<Collection, T> : Publisher where Collection : RealmSubscribable, Collection : ThreadConfined
  • A publisher which emits an object or collection each time that object is mutated.

    See more

    Declaration

    Swift

    @frozen
    public struct Value<Subscribable> : Publisher where Subscribable : RealmSubscribable, Subscribable : ThreadConfined
  • A publisher which emits an object or collection each time that object is mutated.

    See more

    Declaration

    Swift

    public class ValueWithToken<Subscribable, T> : Publisher where Subscribable : RealmSubscribable, Subscribable : ThreadConfined
  • A helper publisher used to support receive(on:) on Realm publishers.

    Declaration

    Swift

    @frozen
    public struct Handover<Upstream, S> : Publisher where Upstream : Publisher, S : Scheduler, Upstream.Output : ThreadConfined
  • A publisher which makes receive(on:) work for streams of thread-confined objects

    Create using .threadSafeReference()

    See more

    Declaration

    Swift

    @frozen
    public struct MakeThreadSafe<Upstream> : Publisher where Upstream : Publisher, Upstream.Output : ThreadConfined
  • A publisher which delivers thread-confined values to a serial dispatch queue.

    Create using .threadSafeReference().receive(on: queue) on a publisher that emits thread-confined objects.

    Declaration

    Swift

    @frozen
    public struct DeferredHandover<Upstream, S> : Publisher where Upstream : Publisher, S : Scheduler, Upstream.Output : ThreadConfined
  • A publisher which emits ObjectChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the objectChangeset() function.

    See more

    Declaration

    Swift

    @frozen
    public struct ObjectChangeset<O> : Publisher where O : ThreadConfined
  • A publisher which emits ObjectChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the objectChangeset() function.

    See more

    Declaration

    Swift

    public class ObjectChangesetWithToken<O, T> : Publisher where O : RealmSwiftObject
  • A helper publisher created by calling .threadSafeReference() on a publisher which emits thread-confined values.

    See more

    Declaration

    Swift

    @frozen
    public struct MakeThreadSafeObjectChangeset<Upstream, T> : Publisher where Upstream : Publisher, T : ThreadConfined, Upstream.Output == ObjectChange<T>
  • A publisher which delivers thread-confined object changesets to a serial dispatch queue.

    Create using .threadSafeReference().receive(on: queue) on a publisher that emits ObjectChange.

    Declaration

    Swift

    @frozen
    public struct DeferredHandoverObjectChangeset<Upstream, T, S> : Publisher where Upstream : Publisher, T : ThreadConfined, S : Scheduler, Upstream.Output == ObjectChange<T>
  • A publisher which emits RealmCollectionChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmCollection.

    See more

    Declaration

    Swift

    @frozen
    public struct CollectionChangeset<Collection> : Publisher where Collection : RealmCollection
  • A publisher which emits RealmMapChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmCollection.

    See more

    Declaration

    Swift

    @frozen
    public struct MapChangeset<Collection> : Publisher where Collection : RealmKeyedCollection
  • A publisher which emits SectionedResultsChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmSectionedResult.

    See more

    Declaration

    Swift

    @frozen
    public struct SectionedResultsChangeset<Collection> : Publisher where Collection : RealmSectionedResult
  • A publisher which emits SectionedResultsChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmSectionedResult.

    See more

    Declaration

    Swift

    @frozen
    public struct SectionChangeset<Collection> : Publisher where Collection : RealmSectionedResult
  • A publisher which emits RealmCollectionChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmCollection.

    See more

    Declaration

    Swift

    public class CollectionChangesetWithToken<Collection, T> : Publisher where Collection : RealmCollection
  • A publisher which emits SectionedResultsChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmSectionedResult.

    See more

    Declaration

    Swift

    public class SectionedResultsChangesetWithToken<Collection, T> : Publisher where Collection : RealmSectionedResult
  • A publisher which emits SectionedResultsChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmSectionedResult.

    See more

    Declaration

    Swift

    public class SectionChangesetWithToken<Collection, T> : Publisher where Collection : RealmSectionedResult
  • A publisher which emits RealmMapChange each time the observed object is modified

    receive(on:) and subscribe(on:) can be called directly on this publisher, and calling .threadSafeReference() is only required if there is an intermediate transform. If subscribe(on:) is used, it should always be the first operation in the pipeline.

    Create this publisher using the changesetPublisher property on RealmCollection.

    See more

    Declaration

    Swift

    public class MapChangesetWithToken<Collection, T> : Publisher where Collection : RealmKeyedCollection
  • A helper publisher created by calling .threadSafeReference() on a publisher which emits RealmCollectionChange.

    See more

    Declaration

    Swift

    @frozen
    public struct MakeThreadSafeCollectionChangeset<Upstream, T> : Publisher where Upstream : Publisher, T : RealmCollection, Upstream.Output == RealmCollectionChange<T>
  • A helper publisher created by calling .threadSafeReference() on a publisher which emits RealmMapChange.

    See more

    Declaration

    Swift

    @frozen
    public struct MakeThreadSafeKeyedCollectionChangeset<Upstream, T> : Publisher where Upstream : Publisher, T : RealmKeyedCollection, Upstream.Output == RealmMapChange<T>
  • A helper publisher created by calling .threadSafeReference() on a publisher which emits SectionedResultsChange.

    See more

    Declaration

    Swift

    @frozen
    public struct MakeThreadSafeSectionedResultsChangeset<Upstream, T> : Publisher where Upstream : Publisher, T : RealmSectionedResult, Upstream.Output == SectionedResultsChange<T>
  • A publisher which delivers thread-confined collection changesets to a serial dispatch queue.

    Create using .threadSafeReference().receive(on: queue) on a publisher that emits RealmCollectionChange.

    Declaration

    Swift

    @frozen
    public struct DeferredHandoverCollectionChangeset<Upstream, T, S> : Publisher where Upstream : Publisher, T : RealmCollection, S : Scheduler, Upstream.Output == RealmCollectionChange<T>
  • A publisher which delivers thread-confined Map changesets to a serial dispatch queue.

    Create using .threadSafeReference().receive(on: queue) on a publisher that emits RealmMapChange.

    Declaration

    Swift

    @frozen
    public struct DeferredHandoverKeyedCollectionChangeset<Upstream, T, S> : Publisher where Upstream : Publisher, T : RealmKeyedCollection, S : Scheduler, Upstream.Output == RealmMapChange<T>
  • A publisher which delivers thread-confined collection changesets to a serial dispatch queue.

    Create using .threadSafeReference().receive(on: queue) on a publisher that emits RealmCollectionChange.

    Declaration

    Swift

    @frozen
    public struct DeferredHandoverSectionedResultsChangeset<Upstream, T, S> : Publisher where Upstream : Publisher, T : RealmSectionedResult, S : Scheduler, Upstream.Output == SectionedResultsChange<T>
  • A publisher which delivers thread-confined collection changesets to a serial dispatch queue.

    Create using .threadSafeReference().receive(on: queue) on a publisher that emits SectionedResultsChange.

    Declaration

    Swift

    @frozen
    public struct DeferredHandoverSectionChangeset<Upstream, T, S> : Publisher where Upstream : Publisher, T : RealmSectionedResult, S : Scheduler, Upstream.Output == SectionedResultsChange<T>