All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.lt.lazy_people_http.call.adapter.CallAdapter.kt Maven / Gradle / Ivy

There is a newer version: 1.2.2
Show newest version
package com.lt.lazy_people_http.call.adapter

import com.lt.lazy_people_http.config.LazyPeopleHttpConfig
import com.lt.lazy_people_http.request.RequestInfo

/**
 * creator: lt  2023/6/28  [email protected]
 * effect : 用于构造网络请求的返回值对象
 * warning:
 * [T]接口声明的返回值类型
 */
interface CallAdapter {
    /**
     * 是否能适配返回值,true为可以
     */
    fun canItAdapt(
        config: LazyPeopleHttpConfig,
        info: RequestInfo,
        returnTypeName: String
    ): Boolean

    /**
     * 构造返回值对象
     */
    fun adapt(
        config: LazyPeopleHttpConfig,
        info: RequestInfo,
    ): T
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy