|
20 | 20 | <p>Deprecation level: <code>ERROR</code></p>
|
21 | 21 | <code-block lang="kotlin">
|
22 | 22 | @Rpc
|
23 |
| - interface Service : RemoteService { |
| 23 | + interface Service { |
24 | 24 | suspend fun old(): StateFlow<Int> // deprecated
|
25 | 25 |
|
26 | 26 | suspend fun new(): Flow<Int> // use .stateIn on the client side
|
|
32 | 32 | <p>Deprecation level: <code>ERROR</code></p>
|
33 | 33 | <code-block lang="kotlin">
|
34 | 34 | @Rpc
|
35 |
| - interface Service : RemoteService { |
| 35 | + interface Service { |
36 | 36 | val old: Flow<Int> // deprecated
|
37 | 37 |
|
38 | 38 | suspend fun new(): Flow<Int> // store flow locally
|
|
43 | 43 | <p>Deprecation level: <code>ERROR</code></p>
|
44 | 44 | <code-block lang="kotlin">
|
45 | 45 | @Rpc
|
46 |
| - interface Service : RemoteService { |
| 46 | + interface Service { |
47 | 47 | suspend fun old(): Flow<Flow<Int>> // deprecated
|
48 | 48 |
|
49 | 49 | // no particular alternative, depends on the use case
|
|
57 | 57 | data class SpotifyWrapped(val myMusicFlow: Flow<Rap>, val extra: Data)
|
58 | 58 |
|
59 | 59 | @Rpc
|
60 |
| - interface Service : RemoteService { |
| 60 | + interface Service { |
61 | 61 | suspend fun old(): SpotifyWrapped // deprecated
|
62 | 62 |
|
63 | 63 | // one should consider message delivery order when calling these
|
|
73 | 73 | data class SpotifyWrapped(val extra: Data)
|
74 | 74 |
|
75 | 75 | @Rpc
|
76 |
| - interface Service : RemoteService { |
| 76 | + interface Service { |
77 | 77 | suspend fun old(): Flow<SpotifyWrapped> // deprecated
|
78 | 78 |
|
79 | 79 | fun new(): Flow<SpotifyWrapped>
|
|
102 | 102 | </p>
|
103 | 103 | <code-block lang="kotlin">
|
104 | 104 | @Rpc
|
105 |
| - interface Service : RemoteService { |
| 105 | + interface Service { |
106 | 106 | suspend fun oldClient(flow: Flow<Int>)
|
107 | 107 | suspend fun oldServer(): Flow<Int>
|
108 | 108 | }
|
|
122 | 122 | </p>
|
123 | 123 | <code-block lang="kotlin">
|
124 | 124 | @Rpc
|
125 |
| - interface Service : RemoteService { |
| 125 | + interface Service { |
126 | 126 | suspend fun newClient(flow: Flow<Int>)
|
127 | 127 | fun newServer(): Flow<Int>
|
128 | 128 | }
|
|
0 commit comments