Skip to content

Commit 705dd56

Browse files
anton-plebanovichfreak4pc
authored andcommitted
- Updates RepeatBehavior documentation to be in correspondence with RxSwift retry operator and the current logic
1 parent 827bd11 commit 705dd56

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

Source/RxSwift/retryWithBehavior.swift

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,33 @@ import Foundation
1010
import RxSwift
1111

1212
/**
13-
Specifies how observable sequence will be repeated in case of an error
14-
- Immediate: Will be immediatelly repeated specified number of times
15-
- Delayed: Will be repeated after specified delay specified number of times
16-
- ExponentialDelayed: Will be repeated specified number of times.
17-
Delay will be incremented by multiplier after each iteration (multiplier = 0.5 means 50% increment)
18-
- CustomTimerDelayed: Will be repeated specified number of times. Delay will be calculated by custom closure
13+
Specifies how observable sequence will be repeated in case of an error.
1914
*/
20-
2115
public enum RepeatBehavior {
16+
17+
/**
18+
Will be immediately repeated specified number of times.
19+
- **maxCount:** Maximum number of times to repeat the sequence.
20+
*/
2221
case immediate (maxCount: UInt)
22+
23+
/**
24+
Will be repeated after specified delay specified number of times.
25+
- **maxCount:** Maximum number of times to repeat the sequence.
26+
*/
2327
case delayed (maxCount: UInt, time: Double)
28+
29+
/**
30+
Will be repeated specified number of times.
31+
Delay will be incremented by multiplier after each iteration (multiplier = 0.5 means 50% increment).
32+
- **maxCount:** Maximum number of times to repeat the sequence.
33+
*/
2434
case exponentialDelayed (maxCount: UInt, initial: Double, multiplier: Double)
35+
36+
/**
37+
Will be repeated specified number of times. Delay will be calculated by custom closure.
38+
- **maxCount:** Maximum number of times to repeat the sequence.
39+
*/
2540
case customTimerDelayed (maxCount: UInt, delayCalculator: (UInt) -> DispatchTimeInterval)
2641
}
2742

0 commit comments

Comments
 (0)