Companion

object Companion

Functions

Link copied to clipboard

得到一个异步执行函数的 AsyncEventResult, 其 AsyncEventResult.content 为一个预期返回 EventResultCompletableFuture.

fun async(deferred: Deferred<EventResult>): AsyncEventResult
inline fun async(scope: CoroutineScope, context: CoroutineContext = EmptyCoroutineContext, start: CoroutineStart = CoroutineStart.DEFAULT, crossinline block: suspend CoroutineScope.() -> Any?): AsyncEventResult

得到一个异步执行函数的 AsyncEventResult, 其 AsyncEventResult.content 为一个预期返回 EventResultDeferred.

Link copied to clipboard

得到一个异步执行函数的 AsyncEventResult, 其 AsyncEventResult.content 为一个预期返回 EventResultCompletableFuture.

Link copied to clipboard

根据是否需要阻断后续监听 isTruncated 来得到一个默认的 EventResult 实例。

Link copied to clipboard

得到一个无效的特殊默认值。

Link copied to clipboard
fun of(content: Any? = null, isTruncated: Boolean = false): EventResult

提供一个 content 得到一个 EventResult 的简易实例。 当 content 不为null时,得到的实例类型为 SimpleEventResult.

Link copied to clipboard

返回一个阻断后续监听函数执行的响应体(EventResult(isTruncated=true))。