File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
core/src/main/scala/in/rcard/raise4s Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change 11package in .rcard .raise4s
22
3- import Bind .value
4-
53import scala .util .{Failure , Success , Try }
64
75private [raise4s] inline def _either [Error , A ](inline block : Raise [Error ] ?=> A ): Either [Error , A ] = {
86 Raise .fold(block, error => Left (error), value => Right (value))
97}
108
11- object RaiseEitherPredef :
12- extension [Error , A ](either : Either [Error , A ])(using r : Raise [Error ])
13- @ deprecated(" Use the extension method 'value' defined in Bind scope instead" , " 0.0.5" )
14- def bind (): A = either.value
15-
16- object RaiseOptionPredef :
17- extension [A ](option : Option [A ])(using optionRaise : Raise [None .type ])
18- @ deprecated(" Use the extension method 'value' defined in Bind scope instead" , " 0.0.5" )
19- def bind (): A = option.value
20-
219private [raise4s] inline def _option [A ](inline block : Raise [None .type ] ?=> A ): Option [A ] = {
2210 Raise .fold(
2311 block,
@@ -26,11 +14,6 @@ private[raise4s] inline def _option[A](inline block: Raise[None.type] ?=> A): Op
2614 )
2715}
2816
29- object RaiseTryPredef :
30- extension [A ](tryValue : Try [A ])(using tryRaise : Raise [Throwable ])
31- @ deprecated(" Use the extension method 'value' defined in Bind scope instead" , " 0.0.5" )
32- def bind (): A = tryValue.value
33-
3417private [raise4s] inline def _asTry [A ](inline block : Raise [Throwable ] ?=> A ): Try [A ] = {
3518 Raise .fold(
3619 block,
You can’t perform that action at this time.
0 commit comments