Change swift-tools-version to 4.0 This allows ProtocolKit to be used from Swift 4.0 packages
Change swift-tools-version to 4.0
This allows ProtocolKit to be used from Swift 4.0 packages
A collection of Swift protocols that define common basic functionality. The current list includes:
public protocol Copiable { associatedtype ReturnType = Self func copy() -> ReturnType }
Implement the copy() function. This function should return the type of the implementing object (e.g. the copy() method of SomeClass returns a SomeClass instance).
copy()
SomeClass
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
ProtocolKit
A collection of Swift protocols that define common basic functionality. The current list includes:
Copiable
Declaration:
Requirements:
Implement the
copy()
function. This function should return the type of the implementing object (e.g. thecopy()
method ofSomeClass
returns aSomeClass
instance).