1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-02-16 05:40:14 +08:00

[core] Make ExternalResource.input an internal API. helps

This commit is contained in:
Him188 2022-09-23 21:14:55 +08:00
parent d000f2ea0f
commit b360f58c2b
No known key found for this signature in database
GPG Key ID: BA439CDDCF652375
3 changed files with 4 additions and 1 deletions
mirai-core-api/src
commonMain/kotlin/utils
jvmBaseMain/kotlin/utils
nativeMain/kotlin/utils

View File

@ -175,6 +175,7 @@ public expect interface ExternalResource : Closeable {
*
* @since 2.13
*/
@MiraiInternalApi
public fun input(): Input
@MiraiInternalApi

View File

@ -187,13 +187,14 @@ public actual interface ExternalResource : Closeable {
/**
* 打开 [Input]. 在返回的 [Input] [关闭][Input.close] 前无法再次打开流.
* 注意: API 不稳定, 请使用 [inputStream] 代替.
*
* 关闭此流不会关闭 [ExternalResource].
* @throws IllegalStateException 当上一个流未关闭又尝试打开新的流时抛出
*
* @since 2.13
*/
@MiraiExperimentalApi
@MiraiInternalApi
public actual fun input(): Input
@MiraiInternalApi

View File

@ -169,6 +169,7 @@ public actual interface ExternalResource : Closeable {
*
* @since 2.13
*/
@MiraiInternalApi
public actual fun input(): Input
@MiraiInternalApi