RACReplaySubject.h 725 B

123456789101112131415161718192021222324252627
  1. //
  2. // RACReplaySubject.h
  3. // ReactiveObjC
  4. //
  5. // Created by Josh Abernathy on 3/14/12.
  6. // Copyright (c) 2012 GitHub, Inc. All rights reserved.
  7. //
  8. #import "RACSubject.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. extern const NSUInteger RACReplaySubjectUnlimitedCapacity;
  11. /// A replay subject saves the values it is sent (up to its defined capacity)
  12. /// and resends those to new subscribers. It will also replay an error or
  13. /// completion.
  14. @interface RACReplaySubject<ValueType> : RACSubject<ValueType>
  15. /// Creates a new replay subject with the given capacity. A capacity of
  16. /// RACReplaySubjectUnlimitedCapacity means values are never trimmed.
  17. + (instancetype)replaySubjectWithCapacity:(NSUInteger)capacity;
  18. @end
  19. NS_ASSUME_NONNULL_END