Rac范型

RACStream 、RACSignal 、RACSequence

typedef RACSequence * _Nullable (^RACSequenceBindBlock)(ValueType _Nullable value, BOOL *stop);
typedef RACSignal * _Nullable (^RACSignalBindBlock)(ValueType _Nullable value, BOOL *stop);
typedef RACStream * _Nullable (^RACStreamBindBlock)(ValueType _Nullable value, BOOL *stop);

在实现体中,其实是
//我们就可以使用泛型和__kindof来解决这个问题。 RACStream或者RACStream的子类

  • (__kindof RACStream *)bind:(RACStreamBindBlock (^)(void))block;
  • (__kindof RACStream *)concat:(RACStream *)stream;
  • (__kindof RACStream *)zipWith:(RACStream *)stream;
  • (__kindof RACStream *)flattenMap:(__kindof RACStream * _Nullable (^)(ValueType _Nullable value))block;
  • (__kindof RACStream *)flatten;
  • (__kindof RACStream *)map:(id _Nullable (^)(ValueType _Nullable value))block;
  • (__kindof RACStream *)mapReplace:(nullable id)object;
  • (__kindof RACStream *)filter:(BOOL (^)(ValueType _Nullable value))block;
  • (__kindof RACStream *)ignore:(nullable ValueType)value;
  • (__kindof RACStream *)reduceEach:(id _Nullable (^)())reduceBlock;
  • (__kindof RACStream *)startWith:(nullable ValueType)value;
  • (__kindof RACStream *)skip:(NSUInteger)skipCount;
  • (__kindof RACStream *)take:(NSUInteger)count;
  • (__kindof RACStream *)scanWithStart:(nullable id)startingValue reduce:(id _Nullable (^)(id _Nullable running, ValueType _Nullable next))reduceBlock;
  • (__kindof RACStream *)scanWithStart:(nullable id)startingValue reduceWithIndex:(id _Nullable (^)(id _Nullable running, ValueType _Nullable next, NSUInteger index))reduceBlock;
  • (__kindof RACStream *)combinePreviousWithStart:(nullable ValueType)start reduce:(id _Nullable (^)(ValueType _Nullable previous, ValueType _Nullable current))reduceBlock;
  • (__kindof RACStream *)takeUntilBlock:(BOOL (^)(ValueType _Nullable x))predicate;
  • (__kindof RACStream *)takeWhileBlock:(BOOL (^)(ValueType _Nullable x))predicate;
  • (__kindof RACStream *)skipUntilBlock:(BOOL (^)(ValueType _Nullable x))predicate;
  • (__kindof RACStream *)skipWhileBlock:(BOOL (^)(ValueType _Nullable x))predicate;
  • (__kindof RACStream *)distinctUntilChanged;
  • (__kindof RACStream *)empty {
  • (__kindof RACStream *)return:(id)value {
  • (__kindof RACStream *)join:(id)streams block:(RACStream * (^)(id, id))block {
  • (__kindof RACStream *)zip:(id)streams {
  • (__kindof RACStream *)zip:(id)streams reduce:(id (^)())reduceBlock {
  • (__kindof RACStream *)concat:(id)streams {
  • (RACSignal *)combineLatest:(id)signals RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)combineLatest:(id)signals reduce:(ValueType _Nullable (^)())reduceBlock RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)merge:(id)signals RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler withLeeway:(NSTimeInterval)leeway RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)try:(nullable ValueType (^)(NSError **errorPtr))tryBlock RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)defer:(RACSignal * (^)(void))block RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)switch:(RACSignal *)signal cases:(NSDictionary *)cases default:(nullable RACSignal *)defaultSignal RAC_WARN_UNUSED_RESULT;
  • (RACSignal *)if:(RACSignal *)boolSignal then:(RACSignal *)trueSignal else:(RACSignal *)falseSignal RAC_WARN_UNUSED_RESULT;

你可能感兴趣的:(Rac范型)