RawRepresentable

public extension RawRepresentable where RawValue == Int

Available where RawValue == Int

  • Returns a sequence that contains all the possible rawValues of self.

    Declaration

    Swift

    static func allValues(startingAt value: Self) -> AnySequence<Self>

    Parameters

    startingAt

    The value from which to start.

  • Returns the count of all the possible values of self, starting in value.

    Complexity

    O(N) where N = #values - startingAt.

    Declaration

    Swift

    static func count(startingAt value: Self) -> Int

    Parameters

    startingAt

    The value from which to start.