Latest 0.2.0
Homepage https://github.com/muukii/OptionalProtocol
License MIT
Platforms ios 8.0, watchos 2.0, osx 10.10
Authors

CI Status
Version
License
Platform
Carthage compatible

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.

Latest podspec

{
    "name": "OptionalProtocol",
    "version": "0.2.0",
    "summary": "OptionalProtocol will be able to add constraint for Optional in generics.",
    "description": "OptionalProtocol will be able to add constraint for Optional in generics.nex: func unwrap (object: T) -> T.Wrapped",
    "homepage": "https://github.com/muukii/OptionalProtocol",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "muukii": "[email protected]"
    },
    "source": {
        "git": "https://github.com/muukii/OptionalProtocol.git",
        "tag": "0.2.0"
    },
    "social_media_url": "https://twitter.com/muukii0803",
    "platforms": {
        "ios": "8.0",
        "watchos": "2.0",
        "osx": "10.10"
    },
    "source_files": "OptionalProtocol/Classes/**/*"
}

Pin It on Pinterest

Share This