subscribeScoped

abstract fun <T> Observable<T>.subscribeScoped(onSubscribe: (Disposable) -> Unit? = null, onError: (Throwable) -> Unit? = null, onComplete: () -> Unit? = null, onNext: (T) -> Unit? = null): Disposable

Same as Observable.subscribe but also adds the Disposable to the scope


abstract fun <T> Single<T>.subscribeScoped(onSubscribe: (Disposable) -> Unit? = null, onError: (Throwable) -> Unit? = null, onSuccess: (T) -> Unit? = null): Disposable

Same as Single.subscribe but also adds the Disposable to the scope


abstract fun <T> Maybe<T>.subscribeScoped(onSubscribe: (Disposable) -> Unit? = null, onError: (Throwable) -> Unit? = null, onComplete: () -> Unit? = null, onSuccess: (T) -> Unit? = null): Disposable

Same as Maybe.subscribe but also adds the Disposable to the scope


abstract fun Completable.subscribeScoped(onSubscribe: (Disposable) -> Unit? = null, onError: (Throwable) -> Unit? = null, onComplete: () -> Unit? = null): Disposable

Same as Completable.subscribe but also adds the Disposable to the scope