https://github.com/samasaur1/protocolkit
A collection of Swift protocols that I use in all my projects
https://github.com/samasaur1/protocolkit
Last synced: about 1 month ago
JSON representation
A collection of Swift protocols that I use in all my projects
- Host: GitHub
- URL: https://github.com/samasaur1/protocolkit
- Owner: Samasaur1
- Created: 2018-10-03T23:01:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-07T14:31:07.000Z (over 6 years ago)
- Last Synced: 2025-03-17T01:48:07.499Z (2 months ago)
- Language: Swift
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProtocolKit
A collection of Swift protocols that define common basic functionality. The current list includes:
## Copiable
### Declaration:
```swift
public protocol Copiable {
associatedtype ReturnType = Self
func copy() -> ReturnType
}
```
### Requirements:
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).