File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // Relays+Infallible.swift
3
+ // RxSwift
4
+ //
5
+ // Created by Mikhail Markin on 18/06/2022.
6
+ // Copyright © 2022 Krunoslav Zaher. All rights reserved.
7
+ //
8
+
9
+ public extension BehaviorRelay {
10
+ /// Convert to an `Infallible`
11
+ ///
12
+ /// - returns: `Infallible<Element>`
13
+ func asInfallible( ) -> Infallible < Element > {
14
+ Infallible ( self . asObservable ( ) )
15
+ }
16
+ }
17
+
18
+ public extension PublishRelay {
19
+ /// Convert to an `Infallible`
20
+ ///
21
+ /// - returns: `Infallible<Element>`
22
+ func asInfallible( ) -> Infallible < Element > {
23
+ Infallible ( self . asObservable ( ) )
24
+ }
25
+ }
26
+
27
+ public extension ReplayRelay {
28
+ /// Convert to an `Infallible`
29
+ ///
30
+ /// - returns: `Infallible<Element>`
31
+ func asInfallible( ) -> Infallible < Element > {
32
+ Infallible ( self . asObservable ( ) )
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments