OptionalProtocol 0.2.0

OptionalProtocol 0.2.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2016
SPMSupports SPM

Maintained by muukii, muukii.



OptionalProtocol

It is impossible to add a constraint of optional in generics. But, OptionalProtocol will enable that.

Example

func unwrap<T: OptionalProtocol>(object: T) -> T.Wrapped

(object: T) must be Optional

Requirements

Installation

OptionalProtocol is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "OptionalProtocol"

Author

muukii, [email protected]

License

OptionalProtocol is available under the MIT license. See the LICENSE file for more info.