除了核心枚举之外,之前存在于 Swift-General-Utility 中的所有其他内容都已移至此处。
内联函数式 Applicative
协议,支持将闭包应用于实例,并返回该实例。
注意: 类型必须符合协议才能继承该行为,因为像 Any
这样的非命名类型无法扩展。
一个字符串化的错误类型,表示运行时错误。
允许在方法链和条件级联中进行调试。
使用 URLSession
请求同步数据。
(data?, error?)
初始化一个 Result
。PROJECT(项目) > Swift Packages(Swift 包) > Install(安装)
https://github.com/erica/https://github.com/erica/Swift-Misc-Utility
SwiftPM
dependencies: [
.package(url: "https://github.com/erica/Swift-Misc-Utility", from: "x.x.x"), // replace with version
],
targets: [
.target(
name: "TARGET-NAME",
dependencies: [
.product(name: "MiscUtility", package: "Swift-Misc-Utility"),
],
),
],