Channel Result
interface ChannelResult<T> : ObjectWrapper<ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>>
代表向 Channel 发送或接收操作的封装结果。
这是一个基于值的返回类型,用于非挂起的操作,如 SendChannel.trySend。 它避免了通过抛出异常来表示失败(例如,因为通道已满或已关闭), 而是将成功、失败或关闭的状态封装在此对象中。
Author
M8Test, [email protected], https://m8test.com
Parameters
T
通道中元素的类型。
Functions
Link copied to clipboard
abstract fun also(block: (ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>) -> Unit): ObjectWrapper<ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>>
对 ObjectWrapper
Link copied to clipboard
abstract fun apply(block: ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>.() -> Unit): ObjectWrapper<ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>>
对 ObjectWrapper
Link copied to clipboard
abstract fun takeIf(predicate: (ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>) -> Boolean): ObjectWrapper<ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>>?
如果 ObjectWrapper
Link copied to clipboard
abstract fun takeUnless(predicate: (ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>) -> Boolean): ObjectWrapper<ERROR CLASS: Symbol not found for kotlinx.coroutines.channels.ChannelResult<T>>?
如果 ObjectWrapper