docs/RxSwift/Subjects.html
`
AsyncSubject
`
An AsyncSubject emits the last value (and only the last value) emitted by the source Observable, and only after that source Observable completes.
(If the source Observable does not emit any values, the AsyncSubject also completes without emitting any values.)
Swift
public final class AsyncSubject<Element>:
Observable<Element>,
SubjectType,
ObserverType,
SynchronizedUnsubscribeType
`
BehaviorSubject
`
Represents a value that changes over time.
Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications.
Swift
public final class BehaviorSubject<Element>:
Observable<Element>,
SubjectType,
ObserverType,
SynchronizedUnsubscribeType,
Cancelable
`
PublishSubject
`
Represents an object that is both an observable sequence as well as an observer.
Each notification is broadcasted to all subscribed observers.
Swift
public final class PublishSubject<Element>:
Observable<Element>,
SubjectType,
Cancelable,
ObserverType,
SynchronizedUnsubscribeType
`
ReplaySubject
`
Represents an object that is both an observable sequence as well as an observer.
Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies.
Swift
public class ReplaySubject<Element>:
Observable<Element>,
SubjectType,
ObserverType,
Disposable
`
SubjectType
`
Represents an object that is both an observable sequence as well as an observer.
Swift
public protocol SubjectType : ObservableType