toMono

fun <T> Publisher<T>.toMono(): Mono<T>

Extension to convert any Publisher of T to a Mono that only emits its first element.

Note this extension doesn't make much sense on a Mono but it won't be converted so it doesn't hurt.

Author

Simon Baslé

Since

3.1.1


fun <T> () -> T?.toMono(): Mono<T>

Extension to convert any Supplier of T to a Mono that emits supplied element.

Author

Sergio Dos Santos


fun <T : Any> T?.toMono(): Mono<T>

Extension for transforming a nullable object to a Mono.

Author

Sebastien Deleuze

Since

3.1


fun <T> CompletableFuture<out T?>.toMono(): Mono<T>

Extension for transforming an CompletableFuture to a Mono.

Author

Sebastien Deleuze

Since

3.1


fun <T> Callable<T?>.toMono(): Mono<T>

Extension for transforming an Callable to a Mono.

Author

Sebastien Deleuze

Since

3.1


fun <T> Throwable.toMono(): Mono<T>

Extension for transforming an exception to a Mono that completes with the specified error.

Author

Sebastien Deleuze

Since

3.1