Extensions

The following extensions are available globally.

  • Extends all RawRepresentables (enums) which are also Decodable with decode implementation.

    I could not find a way to implicitly declare RawRepresentable conforming to Decodable, what would make all enums Decodable automatically. Because of that for an enum to be compatible with Decodable operators it must be declared as implementing Decodable protocol.

    See more

    Declaration

    Swift

    public extension RawRepresentable where RawValue: Decodable, Self: Decodable