gildor
02/23/2017, 1:10 PMmight make sense to create a wrapping class that encapsulates the error / sucess@Paul Woitaschek I use this approach for my coroutine wrapper for Retrofit: https://github.com/gildor/kotlin-coroutines-retrofit#awaitresult
.await returns sealed class ResultPaul Woitaschek
02/23/2017, 1:52 PMT T : Anygildor
02/24/2017, 1:21 AMT : Any make sense for RxJava2, where you cannot use null as result, but for Retrofit you can easily write an adaptor that returns something in one case and null in another, actually even json allow you to use null as top level answer.
So <T : Any> can broke some use cases